pca_importance: PCA importance

Description Usage Arguments Value Examples

View source: R/pca.R

Description

Gets the importance from the PCs.

Usage

1
2
pca_importance(pca.res, pcs = 1:length(pca.res$sdev), sd = TRUE, 
prop = TRUE, cumul = TRUE, min.cum = NULL)

Arguments

pca.res

prcomp object with the PCA results.

pcs

vector with the PCs to get.

sd

boolean value indicating if standard deviation will be returned or not.

prop

boolean value that indicates if the proportion of variance is returned or not.

cumul

boolean value that indicates if the cumulative variance is returned or not.

min.cum

allows to define minimum cumulative % of variance

Value

Returns the information about the importance of the PCs.

Examples

1
2
3
4
5
  ## Example of performing a classical PCA analysis
  library(specmine.datasets)
  data(cachexia)
  pca.result = pca_analysis_dataset(cachexia)
  pca_importance(pca.result, pcs = 1:5)

specmine documentation built on Sept. 21, 2021, 5:06 p.m.