expVarLabel.prcomp: Labels of principal components from prcomp

View source: R/expVar.R

expVarLabel.prcompR Documentation

Labels of principal components from prcomp

Description

Labels of principal components from prcomp

Usage

## S3 method for class 'prcomp'
expVarLabel(x, choices, compact = FALSE)

Arguments

x

A PCAScoreMatrix object

choices

Either a logical/integer vector to indicate which PCs to be returned, or NULL or missing, in which case all PCs are returned

compact

Logical, either a compact label is returned, see examples.

Value

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

Examples


myPr <- prcomp(matrix(rnorm(100), ncol=5))
expVarLabel(myPr)
expVarLabel(myPr, choices=1:2)
expVarLabel(myPr, choices=1:2, compact=TRUE)

bedapub/ribiosPlot documentation built on Sept. 1, 2023, 6:50 p.m.