if (FALSE) {
# This example assumes the graphics output is set to ggplot2 (see ?GraphicsOptions).
library("ggplot2")
data(metMUD1)
pca <- c_pcaSpectra(metMUD1)
p1 <- plotScree(pca)
p1
p2 <- plotScores(metMUD1, pca, pcs = c(1, 2), ellipse = "cls", tol = 0.05)
p2 <- p2 + ggtitle("Scores: metMUD1 NMR Data")
p2
p3 <- plotLoadings(metMUD1, pca, loads = 1:2, ref = 1)
p3 <- p3 + ggtitle("Loadings: metMUD1 NMR Data")
p3
}
Run the code above in your browser using DataLab