Scree Plots from PCA or MIA Analysis of a Spectra or Spectra2D Object
Functions that draw a traditional scree plot, or an alternative style that is perhaps more informative. These plots illustrate the variance explained by each component in a PCA or MIA analysis.
plotScree(pca, style = "alt", ...)
pca |
Either:
|
style |
Character. One of |
... |
Additional parameters to be passed to plotting functions. |
None. Side effect is a plot.
Bryan A. Hanson, DePauw University.
The idea for the alternative style plot came from the NIR-Quimiometria blog by jrcuesta, at https://nir-quimiometria.blogspot.com/2012/02/pca-for-nir-spectrapart-004-projections.html
if (checkForPackageWithVersion("ChemoSpec", "5.1")) { library("ChemoSpec") data(metMUD1) pca <- c_pcaSpectra(metMUD1) plotScree(pca, style = "trad") plotScree(pca, style = "alt") } if (checkForPackageWithVersion("ChemoSpec2D", "0.3")) { library("ChemoSpec2D") data(MUD1) mia <- miaSpectra2D(MUD1) plotScree(mia, style = "alt") }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.