expVarLabel.prcomp | R Documentation |
Labels of principal components from prcomp
## S3 method for class 'prcomp'
expVarLabel(x, choices, compact = FALSE)
x |
A |
choices |
Either a logical/integer vector to indicate which PCs to be
returned, or |
compact |
Logical, either a |
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
myPr <- prcomp(matrix(rnorm(100), ncol=5))
expVarLabel(myPr)
expVarLabel(myPr, choices=1:2)
expVarLabel(myPr, choices=1:2, compact=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.