if (FALSE) {
library(visa)
data(NSpec.DF)
X <- NSpec.DF$spectra[, seq(1, ncol(NSpec.DF$spectra), 5)] # resampled to 5 nm steps
y <- NSpec.DF$N # nitrogen
cm <- cm.nsr(X, y, cm.plot = TRUE)
}
Run the code above in your browser using DataLab