Uses the results from aovPCAscores to plot the corresponding loadings.

aovPCAloadings(spectra, PCA, submat = 1, loads = 1, ref = 1, ...)

Arguments

spectra

An object of S3 class Spectra().

PCA

List of pca results created by aov_pcaSpectra.

submat

Integer. Selects list element submat from PCA which is a list of PCA results, each corresponding to the computation in aov_pcaSpectra.

loads

An integer vector giving the loadings to plot.

ref

An integer specifying the reference spectrum to plot, which appears at the bottom of the plot.

...

Parameters to be passed to the plotting routines. Applies to base graphics only.

Value

The returned value depends on the graphics option selected (see GraphicsOptions()).

  • base: None. Side effect is a plot.

  • ggplot2: The plot is displayed, and a ggplot2 object is returned if the value is assigned. The plot can be modified in the usual ggplot2 manner.

References

Pinto, Bosc, Nocairi, Barros, and Rutledge. "Using ANOVA-PCA for Discriminant Analysis: ..." Analytica Chimica Acta 629.1-2 (2008): 47-55.

Harrington, Vieira, Espinoza, Nien, Romero, and Yergey. "Analysis of Variance--Principal Component Analysis: ..." Analytica Chimica Acta 544.1-2 (2005): 118-27.

See also

An example using this function can be seen in aov_pcaSpectra. See also plotLoadings. Additional documentation at https://bryanhanson.github.io/ChemoSpec/

Author

Bryan A. Hanson (DePauw University), Matthew J. Keinsley.