Explained variance plot for PCA

Share:

Description

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

Usage

1
2
3
4
## S3 method for class 'pca'
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.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.