Plot PCA Loadings from a Spectra Object Against Each Other
Plots two PCA loadings specified by the user, and labels selected (extreme) points. Typically used to determine which variables (frequencies) are co-varying, although in spectroscopy most peaks are represented by several variables and hence there is a lot of co-varying going on. Also useful to determine which variables are contributing the most to the clustering on a score plot.
plot2Loadings(spectra, pca, loads = c(1, 2), tol = 0.05, ...)
spectra |
An object of S3 class |
pca |
An object of class |
loads |
A vector of two integers specifying which loading vectors to plot. |
tol |
A number describing the fraction of points to be labeled.
|
... |
Other parameters to be passed to the plotting routines. |
None. Side effect is a plot.
Bryan A. Hanson, DePauw University.
See plotLoadings
to plot one loading against the
original variable (frequency) axis. See sPlotSpectra
for
a different approach. Additional documentation at
https://bryanhanson.github.io/ChemoSpec/
data(SrE.IR) pca <- c_pcaSpectra(SrE.IR) myt <- expression(bolditalic(Serenoa) ~ bolditalic(repens) ~ bold(IR ~ Spectra)) res <- plot2Loadings(SrE.IR, pca, main = myt, loads = c(1, 2), tol = 0.001 )
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.