Learn R Programming

ChemoSpec (version 4.4.97)

plotScoresDecoration: Decorate PCA Score Plot of a Spectra Object

Description

Utility function to carry out misc. labeling functions on the PCA score plot of a Spectra object. An internal function, not generally called by the user.

Usage

plotScoresDecoration(spectra, pca, pcs = c(1, 2), tol = "none")

Arguments

spectra

An object of S3 class Spectra.

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.

pcs

A vector of two integers specifying the PCA scores to plot.

tol

A number describing the fraction of points to be labeled. tol = 1.0 labels all the points; tol = 0.05 labels the most extreme 5 percent.

Value

None. The score plot is decorated.

References

https://github.com/bryanhanson/ChemoSpec