Apply Savitzky-Golay filters to a Spectra object
This function is a simple wrapper around the function
sgolayfilt
. It allows one to apply Savitzky-Golay
filters to a Spectra
object in a convenient way.
sgfSpectra(spectra, m = 0, ...)
spectra |
An object of S3 class |
m |
The desired m-th derivative. |
... |
Other parameters to be passed to
|
A object of class Spectra
.
Bryan A. Hanson, DePauw University.
Additional documentation at https://bryanhanson.github.io/ChemoSpec/
data(SrE.IR) myt1 <- expression(bolditalic(Serenoa) ~ bolditalic(repens) ~ bold(IR ~ Spectra)) myt2 <- expression(bolditalic(Serenoa) ~ bolditalic(repens) ~ bold(IR ~ Spectra ~ (Smoothed))) par(mfrow = c(2, 1)) plotSpectra(SrE.IR, xlim = c(1900, 2100), yrange = c(0, 0.05), main = myt1) temp <- sgfSpectra(SrE.IR) plotSpectra(temp, xlim = c(1900, 2100), yrange = c(0, 0.05), main = myt2) par(mfrow = c(1, 1))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.