myMat <- matrix(rnorm(100), ncol=10)
myPrcomp <- prcomp(myMat)
myPcaScoreMatrix <- pcaScores(myPrcomp, choices=NULL)
expVar(myPrcomp)
expVar(myPcaScoreMatrix)
expVar(myPrcomp, 1:5)
expVar(myPcaScoreMatrix, 1:5)
Run the code above in your browser using DataLab