Learn R Programming

mdatools (version 0.9.1)

plotVariance.pca: Explained variance plot for PCA

Description

Shows a plot with explained variance or cumulative explained variance for components.

Usage

# S3 method for pca
plotVariance(obj, type = "b", variance = "expvar",
  main = "Variance", xlab = "Components", ylab = "Explained variance, %",
  show.legend = T, ...)

Arguments

obj

a PCA model (object of class pca)

type

type of the plot ('b', 'l', 'h')

variance

which variance to use ('expvar', 'cumexpvar')

main

main title for the plot

xlab

label for x axis

ylab

label for y axis

show.legend

logical, show or not a legend on the plot

...

other plot parameters (see mdaplotg for details)

Details

See examples in help for pca function.