Content Description

Generalized Procrustes Analysis (GPA) aligns our landmark configurations to a common coordinate system, and allows us to extract shape (and size) data from them. The function gpagen performs this procedure. Here we demonstrate its use for landmark data:

Performing GPA Superimposition

library(geomorph)
## Loading required package: RRPP
## Loading required package: rgl
## Loading required package: Matrix
data(plethodon)
pleth.gpa <- gpagen(plethodon$land, print.progress = F)
summary(pleth.gpa)
## 
## Call:
## gpagen(A = plethodon$land, print.progress = F) 
## 
## 
## 
## Generalized Procrustes Analysis
## with Partial Procrustes Superimposition
## 
## 12 fixed landmarks
## 0 semilandmarks (sliders)
## 2-dimensional landmarks
## 2 GPA iterations to converge
## 
## 
## Consensus (mean) Configuration
## 
##              X            Y
## 1   0.15233235 -0.025236647
## 2   0.19328979 -0.095041344
## 3  -0.03370053 -0.006929874
## 4  -0.28182427 -0.089370882
## 5  -0.31072667 -0.057833070
## 6  -0.32600020 -0.032082160
## 7  -0.31757270  0.040056685
## 8  -0.18824427  0.100347118
## 9   0.02159274  0.098853343
## 10  0.18946790  0.074940119
## 11  0.35213101  0.061515271
## 12  0.54925485 -0.069218559

Using summary provides us with a general description of the analysis we performed. Additionally, there are quite a few components to our GPA object: the most important of which are $coords and $Csize$

attributes(pleth.gpa)
## $names
##  [1] "coords"       "Csize"        "iter"         "rot.pts"      "consensus"   
##  [6] "procD"        "p"            "k"            "nsliders"     "nsurf"       
## [11] "points.VCV"   "points.var"   "data"         "Q"            "slide.method"
## [16] "call"        
## 
## $class
## [1] "gpagen"

Plotting GPA-Aligned Specimens

plot(pleth.gpa)

plotAllSpecimens(pleth.gpa$coords, links = plethodon$links)

Use of plot.param can facilitate additional flexibility (change point or link colors, thickness, etc.)