Learn R Programming

specmine (version 1.0)

pca_screeplot: PCA scree plot

Description

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

Usage

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

Run this code
  ## Example of a scree plot
  data(cachexia)
  pca.result = pca_analysis_dataset(cachexia)
  pca_screeplot(pca.result)

Run the code above in your browser using DataLab