View source: R/restoreShapes.r
restoreFromPCA | R Documentation |
restore original data from PCA by reverting rotation and centering
restoreFromPCA(scores, rotation, center)
scores |
matrix containing the PC-scores |
rotation |
matrix containing the PCs |
center |
vector containing the center |
myirispca <- prcomp(iris[,1:4])
myirisRecovered <- restoreFromPCA(myirispca$x,myirispca$rotation,myirispca$center)
all.equal(myirisRecovered,as.matrix(iris[,1:4]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.