Learn R Programming

monogeneaGM (version 1.1)

procrustesFit.2: Mass Extraction of Generalized Procrustes Analysis Coordinates from Anchors

Description

Given a list of landmark coordinate data, this function performs Generalized Procrustes Analysis (GPA) and extracts the GPA-coordinates.

Usage

procrustesFit.2(x, e, makeplot = FALSE, reflect = FALSE, swap = TRUE, axispointscale = 0.8, sgn = c(1, -1))

Arguments

x
a list containing landmark coordinate data of anchors from the specimens of interest
e
a constant specifying the anchor of interest: ventral right(1), ventral left(2), dorsal right(3), dorsal left(4)
makeplot
if TRUE, returns a scatter plot of the GPA-coordinates
reflect
logical; if TRUE, x-coordinates are reflected around the x=0 axis
swap
logical; if TRUE, the x and y-coordinates are swapped
axispointscale
a numeric constant for controlling the font size of numeric values on the xy axes
sgn
a numeric vector; two choices 1 and -1; defaults to c(1,-1)

Value

an array containing GPA-coordinates of the specimens of interest

Details

This function is essentially a wrapper for procrustesFit and stdLM to ease extraction of GPA-coordinates from list data. Both require the geomorph package (Version 3.0.0).

References

Khang TF, Soo OYM, Tan WB, Lim LHS. (2016). Monogenean anchor morphometry: systematic value, phylogenetic signal, and evolution. PeerJ 4:e1668.

Adams DC, Otarola-Castillo E. (2013). geomorph: an R package for the collection and analysis of geometric morphometric shape data. Methods in Ecology and Evolution 4:393-399.

See Also

procrustesFit, stdLM

Examples

Run this code
data(ligophorus_tpsdata)

vright <- procrustesFit.2(ligophorus_tpsdata$johorensis, 1,
makeplot=TRUE, reflect=FALSE, swap=TRUE, sgn=c(-1,1))

vleft <- procrustesFit.2(ligophorus_tpsdata$johorensis, 2,
makeplot=TRUE, reflect=TRUE, swap=TRUE, sgn=c(-1,1))

va <- (vright+vleft)/2

plotLM(va, "VA", pointscale=0.8, meansize=1.2, polygon.outline=TRUE,
axispointscale=0.8, c(-.6,.6),c(-.6,.6))

Run the code above in your browser using DataLab