powered by
Labels of principal components from prcomp
# S3 method for prcomp expVarLabel(x, choices, compact = FALSE)
A character string vector of the same length as choices (or the same length as the column count of the scores), which are the labels of the PCs
choices
A PCAScoreMatrix object
PCAScoreMatrix
Either a logical/integer vector to indicate which PCs to be returned, or NULL or missing, in which case all PCs are returned
NULL
Logical, either a compact label is returned, see examples.
compact
myPr <- prcomp(matrix(rnorm(100), ncol=5)) expVarLabel(myPr) expVarLabel(myPr, choices=1:2) expVarLabel(myPr, choices=1:2, compact=TRUE)
Run the code above in your browser using DataLab