pcaScreePlot: Scree Plot

View source: R/pcaScreePlot.R

pcaScreePlotR Documentation

Scree Plot

Description

Returns a bar plot of the percentage of variance explained by each Principal Component calculated by pcaBySvd.

Usage

pcaScreePlot(
  resPcaBySvd,
  nPC = 5,
  title = "PCA scree plot",
  theme = theme_bw()
)

Arguments

resPcaBySvd

A list corresponding to the output value of pcaBySvd.

nPC

An integer with the number of Principal Components to plot.

title

Plot title.

theme

ggplot theme, see ?ggtheme for more info.

Value

A PCA scree plot

Examples


 data('UCH')
 resPCA = pcaBySvd(UCH$outcomes)
 pcaScreePlot(resPCA, nPC=4)


bgovaerts/LMWiRe documentation built on Sept. 17, 2022, 12:32 a.m.