Learn R Programming

ribiosPlot (version 1.3.0)

getExpVarLabel: Helper function to print PC and explained variances

Description

Helper function to print PC and explained variances

Usage

getExpVarLabel(ev, choices, compact = FALSE)

Value

A character vector of labels in the form

"Principal component N (X% variance explained)".

Arguments

ev

A numeric vector of explained variances

choices

An integer vector to indicate which PCs to be returned. If NULL or NA or missing, all elements are returned.

compact

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