w_savgol | R Documentation |
Smooth values using a Savitzky-Golay filter. This function is suitable for not equally-spaced and/or weighted data.
w_savgol(y, x, q, window = 7, polynom = 3)
y |
List of floats representing the "y" values. |
x |
List of floats representing the "x" values of the data.
Must have same length as |
q |
List of floats representing the relative weight of "y" values.
Must have same length as |
window |
Window length of datapoints.
Must be odd and smaller than |
polynom |
The polynomial order to be used.
Must be smaller than the |
The smoothed "y" values.
This is an R adaptation of Python function at https://dsp.stackexchange.com/questions/1676/savitzky-golay-smoothing-filter-for-not-equally-spaced-data, with the addition of weights following https://en.wikipedia.org/wiki/Savitzky-Golay_filter.
Luigi Ranghetti, PhD (2020) luigi@ranghetti.info
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.