Description Usage Arguments Value Author(s) Examples
Given a PCA object created with [prcomp][stats::prcomp], this function computes the percent of variance explained by each of the principal components.
1 | getPcaVars(pca, digits = 3)
|
pca |
An object created with [prcomp][stats::prcomp]. |
digits |
The number of significant digits to round to. |
A vector with the percent of variance explained for each of the principal components in decreasing order.
Andrew E Jaffe
1 2 | pca <- prcomp(USArrests)
getPcaVars(pca)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.