| plotLoadings {ChemoSpec} | R Documentation |
Creates a multi-panel plot of loadings along with a reference spectrum.
plotLoadings(spectra, pca, loads = c(1), ref = 1, ...)
spectra |
An object of S3 class |
pca |
An object of class |
loads |
An integer vector giving the loadings to plot. More than 3 loadings creates a useless plot using the default graphics window. |
ref |
An integer specifying the reference spectrum to plot, which appears at the bottom of the plot. |
... |
Additional parameters to be passed to plotting functions. |
None. Side effect is a plot.
Bryan A. Hanson, DePauw University.
https://github.com/bryanhanson/ChemoSpec
See plot2Loadings to plot two loadings against each
other, and sPlotSpectra for an alternative approach.
data(SrE.IR) pca <- c_pcaSpectra(SrE.IR, choice = "noscale") myt <- expression(bolditalic(Serenoa)~bolditalic(repens)~bold(IR~Spectra)) plotLoadings(SrE.IR, pca, main = myt, loads = 1:2, ref = 1)