Shows a plot with explained variance or cumulative explained variance for components.
# S3 method for pca
plotVariance(obj, type = "b", variance = "expvar",
main = "Variance", xlab = "Components", ylab = "Explained variance, %",
show.legend = T, ...)
a PCA model (object of class pca
)
type of the plot ('b', 'l', 'h')
which variance to use ('expvar', 'cumexpvar')
main title for the plot
label for x axis
label for y axis
logical, show or not a legend on the plot
other plot parameters (see mdaplotg
for details)
See examples in help for pca
function.