Learn R Programming

mdatools (version 0.7.0)

plotVariance.pca: Explained variance plot for PCA

Description

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

Usage

"plotVariance"(obj, type = "b", variance = "expvar", main = "Variance", xlab = "Components", ylab = "Explained variance, %", show.legend = T, show.labels = F, ...)

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
show.labels
logical, show or not labels for the plot objects
...
other plot parameters (see mdaplotg for details)

Details

See examples in help for pca function.