Learn R Programming

Morpho (version 2.12)

getPCscores: Obtain PC-scores for new landmark data

Description

Obtain PC-scores for new landmark data

Usage

getPCscores(x, PC, mshape)

Value

returns a matrix containing the PC scores

Arguments

x

landmarks aligned (e.g. using align2procSym to the meanshape of data the PCs are derived from.

PC

Principal components (eigenvectors of the covariance matrix)

mshape

matrix containing the meanshape's landmarks (used to center the data)

See Also

restoreShapes

Examples

Run this code
if (FALSE) {
data(boneData)
proc <- procSym(boneLM[,,-c(1:2)])
newdata <- boneLM[,,c(1:2)]
newdataAlign <- align2procSym(proc,newdata)
scores <- getPCscores(newdataAlign,proc$PCs,proc$mshape)
}

Run the code above in your browser using DataLab