Learn R Programming

specmine (version 3.1.6)

pca_importance: PCA importance

Description

Gets the importance from the PCs.

Usage

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

Run this code
# NOT RUN {
  ## 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)
# }

Run the code above in your browser using DataLab