restoreFromPCA: restore original data from PCA

View source: R/restoreShapes.r

restoreFromPCAR Documentation

restore original data from PCA

Description

restore original data from PCA by reverting rotation and centering

Usage

restoreFromPCA(scores, rotation, center)

Arguments

scores

matrix containing the PC-scores

rotation

matrix containing the PCs

center

vector containing the center

Examples

myirispca <- prcomp(iris[,1:4])
myirisRecovered <- restoreFromPCA(myirispca$x,myirispca$rotation,myirispca$center)
all.equal(myirisRecovered,as.matrix(iris[,1:4]))

Morpho documentation built on June 22, 2024, 7:19 p.m.