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