| predict.specproc_transfer | R Documentation |
Transfers spectra measured on the secondary instrument to the primary
instrument, with a transfer fitted by ds(), sst() or pds().
## S3 method for class 'specproc_transfer'
predict(object, newdata, ...)
object |
A transfer returned by |
newdata |
Spectra of the secondary instrument: a numeric matrix or data frame with the wavelengths of the transfer spectra. |
... |
Not used. |
The transferred spectra, a matrix (or a tibble for a data frame) with the wavelengths of the primary spectra.
ds(), sst(), pds()
data(forageLIBS)
wl <- suppressWarnings(as.numeric(names(forageLIBS)))
spectra <- as.matrix(forageLIBS[which(wl > 760 & wl < 780)])
secondary <- 0.8 * cbind(spectra[, -1], spectra[, ncol(spectra)]) + 50
transfer <- pds(spectra[1:30, ], secondary[1:30, ], win = 3)
transferred <- predict(transfer, secondary[31:40, ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.