Learn R Programming

RFmarkerDetector (version 1.0.1)

screeplot: Scree Plot

Description

This function creates a graphical display of the variances against the number of principal components. It is used to determine how many components should be retained in order to explain a high percentage of the variation in the data

Usage

screeplot(pca_obj, ncomp)

Arguments

pca_obj
an object of class pca
ncomp
the number of components to plot

Details

screplot generates 2 graphs that represent respectively the relative variances and the cumulative variances associated with the principal components

Examples

Run this code
## data(cachexiaData)
## pca_obj <- pca(cachexiaData, autoscale = TRUE, exclude = TRUE)
## screeplot(pca_obj, ncomp = 10)

Run the code above in your browser using DataLab