cv_pcaSpectra: Cross-Validation of Classical PCA Results for a Spectra Object
Description
This function carries out classical PCA on the data in a
Spectra object using a cross-validation method. A simple
re-write of Peter Filzmoser's pcaCV method
with some small plotting changes.
# You need to install package "pls" for this exampleif (requireNamespace("pls", quietly = TRUE)) {
data(SrE.IR)
pca <- cv_pcaSpectra(SrE.IR, pcs = 5)
}