Shows a plot with explained variance or cumulative explained variance for components.
# S3 method for pca
plotVariance(
obj,
type = "b",
labels = "values",
variance = "expvar",
xticks = seq_len(obj$ncomp),
res = obj$res,
ylab = "Explained variance, %",
...
)
a PCA model (object of class pca
)
type of the plot ("b", "l", "h")
what to use as labels (if show.labels = TRUE
)
which variance to show
vector with ticks for x-axis
list with result objects to show the variance for
label for y-axis
other plot parameters (see mdaplotg
for details)
See examples in help for pca
function.