prep.savgol: Savytzky-Golay filter

View source: R/prep.R

prep.savgolR Documentation

Savytzky-Golay filter

Description

Applies Savytzky-Golay filter to the rows of data matrix

Usage

prep.savgol(data, width = 3, porder = 1, dorder = 0)

Arguments

data

a matrix with data values

width

width of the filter window

porder

order of polynomial used for smoothing

dorder

order of derivative to take (0 - no derivative)

Details

The function implements algorithm described in [1] which handles the edge points correctly and does not require to cut the spectra.

References

1. Peter A. Gorry. General least-squares smoothing and differentiation by the convolution (Savitzky-Golay) method. Anal. Chem. 1990, 62, 6, 570–573, https://doi.org/10.1021/ac00205a007.


svkucheryavski/mdatools documentation built on Aug. 25, 2023, 12:27 p.m.