plotScree: Scree Plots of PCA Results for a Spectra Object

Description Usage Arguments Details Value Functions Author(s) References Examples

View source: R/plotScree.R

Description

Functions to draw a traditional scree plot or an alternative that is perhaps more useful. These illustrate the importance of the components in a PCA analysis.

Usage

1
2
3

Arguments

pca

An object of class prcomp, modified to include a list element called $method, a character string describing the pre-processing carried out and the type of PCA performed (it appears on the plot). This is automatically provided if ChemoSpec functions c_pcaSpectra or r_pcaSpectra were used to create pca.

...

Additional parameters to be passed to plotting functions.

Details

If you add $method to the PCA results from other packages, this will plot a scree plot for any PCA results, not just those from Spectra objects.

Value

None. Side effect is a plot.

Functions

Author(s)

Bryan A. Hanson, DePauw University.

References

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

https://github.com/bryanhanson/ChemoSpec

Examples

1
2
3
4
data(metMUD1)
pca <- c_pcaSpectra(metMUD1)
plotScree(pca, main = "metMUD1 NMR Data")
plotScree2(pca, main = "metMUD1 NMR Data")

ChemoSpec documentation built on May 29, 2017, 8:16 p.m.

Search within the ChemoSpec package
Search all R packages, documentation and source code