Description Usage Arguments Details References See Also Examples
Plotting functions for PCA: for scores, loadings, scores and loadings simultaneously (a biplot), and variances (a screeplot, where the log of the explained variance is plotted for each PC).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## S3 method for class 'PCA'
scoreplot(object, pc = c(1,2),
pcscores = scores(object),
show.names = FALSE, xlab, ylab, xlim, ylim,
...)
## S3 method for class 'PCA'
loadingplot(object, pc = c(1,2),
pcloadings = loadings(object),
scalefactor = 1, add = FALSE,
show.names = FALSE, xlab, ylab, xlim, ylim,
col = "blue", min.length = .01, varnames = NULL,
...)
screeplot(object, type = c("scree", "percentage"), npc, ...)
## S3 method for class 'PCA'
biplot(x, pc = c(1,2),
pcscores = scores(object),
pcloadings = loadings(object),
show.names = c("none", "scores", "loadings", "both"),
score.col = 1, loading.col = "blue",
min.length = .01, varnames = NULL, ...)
|
object, x |
an object of class "PCA" (see below). |
pc |
which PCs to show. |
pcscores |
what scores to plot. If given, this makes the
|
pcloadings |
what loadings to plot. If given, this makes the
|
scalefactor |
scaling factor for the loadings; used internally, when
the |
add |
logical, whether to add to the existing plot (again, useful
when |
show.names |
show names rather than plotting
symbols. For |
xlab, ylab, xlim, ylim, col, ... |
additional graphical arguments
(see |
npc |
how many PCs to show in the scree plot (starting from 1). |
type |
show a real screeplot ( |
score.col, loading.col |
colours of the scores and loadings in a biplot. |
min.length |
minimal length of loading vectors to be plotted by arrows. Vectors that are too short lead to warning messages, are not interesting, and only clutter the graphic. |
varnames |
alternative vector of variable names. |
Score plots and loading plots show the amount of explained variance at the axis labels, but only when PCA has been performed at mean-centered data.
R. Wehrens: "Chemometrics with R - Multivariate Data Analysis in the Natural Sciences and Life Sciences". Springer, Heidelberg, 2011.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.