Shows a scores plot for selected components.
# S3 method for pca
plotScores(
obj,
comp = if (obj$ncomp > 1) c(1, 2) else 1,
type = "p",
show.axes = TRUE,
show.legend = TRUE,
res = obj$res,
...
)
a PCA model (object of class pca
)
a value or vector with several values - number of components to show the plot for
type of the plot ("p", "l", "b", "h")
logical, show or not a axes lines crossing origin (0,0)
logical, show or not a legend on the plot
list with result objects to show the variance for
other plot parameters (see mdaplotg
for details)
If plot is created only for one result object (e.g. calibration set), then the behaviour and
all settings for the scores plot are identical to plotScores.ldecomp
. In this case
you can show scores as a scatter, line or bar plot for any number of components.
Otherwise (e.g. if model contains results for calibration and test set) the plot is a group
plot created using mdaplotg
method and only scatter plot can be used.
See examples in help for pca
function.