plotScores.pca {mdatools} | R Documentation |
Scores plot for PCA model
Description
Shows a scores plot for selected components.
Usage
## S3 method for class 'pca'
plotScores(
obj,
comp = if (obj$ncomp > 1) c(1, 2) else 1,
type = "p",
show.axes = TRUE,
show.legend = TRUE,
res = obj$res,
...
)
Arguments
obj |
a PCA model (object of class |
comp |
a value or vector with several values - number of components to show the plot for |
type |
type of the plot ("p", "l", "b", "h") |
show.axes |
logical, show or not a axes lines crossing origin (0,0) |
show.legend |
logical, show or not a legend on the plot |
res |
list with result objects to show the variance for |
... |
other plot parameters (see |
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.