pca_screeplot: PCA scree plot

Description Usage Arguments Examples

View source: R/pca.R

Description

PCA scree plot with the proportion and cumulative variance of the PCs.

Usage

1
2
3
4
pca_screeplot(pca.result, num.pcs = NULL, cex.leg = 0.8, 
leg.pos = "right", lab.text = c("individual percent", 
"cumulative percent"), fill.col = c("blue", "red"), 
ylab = "Percentage", xlab = "Principal components", ...)

Arguments

pca.result

prcomp object with the PCA results.

num.pcs

number of principal components.

cex.leg

cex value of legend.

leg.pos

legend position.

lab.text

legend's labels.

fill.col

color of the legend's boxes.

ylab

y-axis label.

xlab

x-axis label

...

additional parameters to matplot.

Examples

1
2
3
4
5
  ## Example of a scree plot
  library(specmine.datasets)
  data(cachexia)
  pca.result = pca_analysis_dataset(cachexia)
  pca_screeplot(pca.result)

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