| predict.specproc_emsc | R Documentation |
Corrects new spectra with the reference spectrum, polynomial basis and
interferents of a model fitted by emsc().
## S3 method for class 'specproc_emsc'
predict(object, newdata, ...)
object |
An object returned by |
newdata |
A numeric matrix or data frame of new spectra, with the same variables as the calibration data. |
... |
Not used. |
A tibble of corrected spectra.
emsc(), predict.specproc_filter()
data(forageLIBS)
wl <- suppressWarnings(as.numeric(names(forageLIBS)))
spectra <- forageLIBS[which(wl > 760 & wl < 780)] # the K I resonance lines
fit <- emsc(spectra[1:300, ], degree = 2)
corrected <- predict(fit, spectra[301:368, ])
dim(corrected)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.