predict.specproc_transfer: Transfer Spectra to Another Instrument

View source: R/transfer.R

predict.specproc_transferR Documentation

Transfer Spectra to Another Instrument

Description

Transfers spectra measured on the secondary instrument to the primary instrument, with a transfer fitted by ds(), sst() or pds().

Usage

## S3 method for class 'specproc_transfer'
predict(object, newdata, ...)

Arguments

object

A transfer returned by ds(), sst() or pds().

newdata

Spectra of the secondary instrument: a numeric matrix or data frame with the wavelengths of the transfer spectra.

...

Not used.

Value

The transferred spectra, a matrix (or a tibble for a data frame) with the wavelengths of the primary spectra.

See Also

ds(), sst(), pds()

Examples

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, ])

specProc documentation built on Nov. 20, 2026, 5:11 p.m.