getPcaVars: Calculates the percent of variance explained for principal...

Description Usage Arguments Value Author(s) Examples

View source: R/getPcaVars.R

Description

Given a PCA object created with [prcomp][stats::prcomp], this function computes the percent of variance explained by each of the principal components.

Usage

1
getPcaVars(pca, digits = 3)

Arguments

pca

An object created with [prcomp][stats::prcomp].

digits

The number of significant digits to round to.

Value

A vector with the percent of variance explained for each of the principal components in decreasing order.

Author(s)

Andrew E Jaffe

Examples

1
2

blackthornrx/rbnctools documentation built on Feb. 6, 2021, 12:27 a.m.