Learn R Programming

hyperSpec (version 0.98-20110927)

spc-loess: loess smoothing interpolation for spectra...

Description

loess smoothing interpolation for spectra Spectra can be smoothed and interpolated on a new wavelength axis using loess.

Usage

spc.loess(spc, newx, enp.target=nwl(spc)/4, surface="direct", ...,
    short="spc.loess", user=NULL, date=NULL)

Arguments

spc
the hyperSpec object
newx
wavelengh axis tointrpolate on
enp.target,surface,...
parameters for loess and loess.control.
short,user,date
handed to logentry.

Value

  • a new hyperspec object.

Details

Applying loess to each of the spectra, an interpolation onto a new wavelength axis is performed. At the same time, the specta are smoothed in order to increase the signal : noise ratio. See loess and loess.control on the parameters that control the amount of smoothing.

See Also

loess, loess.control

Examples

Run this code
plot (flu, col = "darkgray")
plot (spc.loess(flu, seq (420, 470, 5)), add = TRUE, col = "red")

flu [[3, ]] <- NA_real_
smooth <- spc.loess(flu, seq (420, 470, 5))
smooth [[, ]]
plot (smooth, add = TRUE, col = "blue")

Run the code above in your browser using DataLab