Learn R Programming

ChemoSpec (version 4.2.8)

plotScores: Plot PCA Scores of a Spectra Object

Description

Plots the requested PCA scores using the color scheme derived from a Spectra object. Options are provided to add confidence ellipses for each group in the object. The ellipses may be robust or classical. Option to label the extreme points provided.

Usage

plotScores(spectra, pca, pcs = c(1, 2),
	ellipse = "none", tol = "none",
	use.sym = FALSE, leg.loc = "topright", ...)

Arguments

Value

None. Side effect is a plot.

Rdversion

1.1

References

https://github.com/bryanhanson/ChemoSpec

See Also

For other ways of displaying the results, plotScree, plotLoadings, plot2Loadings. For a 3D plot of the scores, see plotScores3D, or plotScoresRGL for an interactive version.

Examples

Run this code
data(metMUD1)
results <- c_pcaSpectra(metMUD1)
plotScores(metMUD1, results, main = "metMUD1 NMR Data",
	pcs = c(1,2), ellipse = "cls", tol = 0.05)

Run the code above in your browser using DataLab