Plot Scores from PCA, MIA or PARAFAC Analysis of a Spectra or Spectra2D Object
plotScores( spectra, so, pcs = c(1, 2), ellipse = "none", tol = "none", use.sym = FALSE, leg.loc = "topright", ... )
spectra |
|
so |
"Score Object" One of the following:
Any of the above score objects will have been modified to include a
list element called |
pcs |
A vector of two integers specifying the components (scores) to plot. |
ellipse |
A character vector specifying the type of ellipses to be
plotted. One of |
tol |
A number describing the fraction of points to be labeled.
|
use.sym |
A logical; if TRUE, the color scheme is set to black and the
points plotted with symbols. Applies only to |
leg.loc |
Character; if |
... |
Additional parameters to be passed to the plotting functions. |
None. Side effect is a plot.
Bryan A. Hanson, DePauw University.
if (checkForPackageWithVersion("ChemoSpec", "5.1")) { library("ChemoSpec") data(metMUD1) pca <- c_pcaSpectra(metMUD1) plotScores(metMUD1, pca, main = "metMUD1 NMR Data", pcs = c(1, 2), ellipse = "cls", tol = 0.05 ) } if (checkForPackageWithVersion("ChemoSpec2D", "0.3")) { library("ChemoSpec2D") data(MUD1) res <- miaSpectra2D(MUD1) plotScores(MUD1, res, main = "MIA Scores", tol = 0.1, ellipse = "cls") set.seed(123) res <- pfacSpectra2D(MUD1, parallel = FALSE, nfac = 2) plotScores(MUD1, res, tol = 0.1, leg.loc = "bottomright", main = "PARAFAC Score Plot") }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.