prep.savgol | R Documentation |
Applies Savytzky-Golay filter to the rows of data matrix
prep.savgol(data, width = 3, porder = 1, dorder = 0)
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) |
The function implements algorithm described in [1] which handles the edge points correctly and does not require to cut the spectra.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.