Learn R Programming

Morpho (version 2.1)

showPC: convert PCs to landmark configuration

Description

convert PC-scores to landmark coordinates

Usage

showPC(scores, PC, mshape)

Arguments

scores
vector of PC-scores
PC
Principal components (eigenvectors of the covariance matrix) associated with 'scores'.
mshape
matrix containing the meanshape's landmarks (used to center the data by the PCA)

Value

  • returns matrix containing landmarks

Details

Rotates and translates PC-scores derived from shape data back into configuration space.

See Also

prcomp, procSym

Examples

Run this code
library(shapes)
## generate landmarks using
##the first PC-score of the first specimen

proc <- procSym(gorf.dat)
lm <- showPC(proc$PCscores[1,1],proc$PCs[,1],proc$mshape)
plot(lm,asp=1)

##now the first 3 scores
lm2 <- showPC(proc$PCscores[1,1:3],proc$PCs[,1:3],proc$mshape)
points(lm2,col=2)

Run the code above in your browser using DataLab