plot3dScores | R Documentation |
Creates an interactive 3D plot of PCA scores from the analysis of a
Spectra
object, color coded according the to scheme stored in
the object. The plot is created by plotly
and appears in a browser window.
plot3dScores(
spectra,
pca,
pcs = c(1:3),
ellipse = TRUE,
rob = FALSE,
cl = 0.95,
frac.pts.used = 0.8
)
spectra |
An object of S3 class |
pca |
An object of class |
pcs |
A vector of three integers specifying the PCA scores to plot. |
ellipse |
Logical indicating if confidence ellipses should be drawn. |
rob |
Logical; if |
cl |
A number indicating the confidence interval for the ellipse. |
frac.pts.used |
If |
None. Side effect is a plot in a browser window.
Bryan A. Hanson (DePauw University).
Additional documentation at https://bryanhanson.github.io/ChemoSpec/
if (interactive()) {
data(metMUD1)
pca <- c_pcaSpectra(metMUD1, choice = "noscale")
p <- plot3dScores(metMUD1, pca)
p
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.