pcaVar: Cumulative variance reduction

Description Usage Arguments Value Examples

View source: R/pca_tools.R

Description

Compute and (optionally) plot cumulative variance reduction of PCs returned from prcomp

Usage

1
pcaVar(p, plot = TRUE, n = length(p$sdev))

Arguments

p

"prcomp" list from prcomp

plot

produce a ggplot2 plot

n

starting with PC #1, the number of PCs that should be included in results, defaults to all

Value

data.frame with PC index, the associated eigenvalue, variance (squared eigenvalue) and cumulative variance.

Examples

1
2

jrevenaugh/TSAUMN documentation built on Nov. 8, 2019, 2:20 p.m.