This function is a wrapper for the Mclust
function and associated
plotting functions.
An object of S3 class Spectra()
.
An object of class prcomp
.
An integer vector describing which PCs to use.
A integer vector giving the PCA dimensions to use.
A character string indicating what plot to make. Options are
c("BIC", "proj", "error")
; see Mclust
for details.
Logical; if true, the color scheme is changed to black and symbols are used for plotting.
Other parameters to be passed downstream.
The Mclust
model is returned invisibly, and a plot is made.
Mclust
for background on the method.
Additional documentation at https://bryanhanson.github.io/ChemoSpec/
if (FALSE) {
require("mclust")
data(metMUD1)
cls <- c_pcaSpectra(metMUD1, choice = "autoscale")
p <- plotScores(metMUD1, cls)
mclustSpectra(metMUD1, cls, plot = "BIC")
mclustSpectra(metMUD1, cls, plot = "proj")
mclustSpectra(metMUD1, cls, plot = "errors", truth = metMUD1$groups)
}