SmoothInterp | R Documentation |
Smooths a time series and interpolates for missing values
SmoothInterp(.timeSeries, .maxGap = 1000, .Length = 61, .order = 3)
.timeSeries |
A numeric vector containing a series to be smoothed. |
.maxGap |
The largest gap across which to interpolate |
.Length |
The length of the segment for Savitzky-Golay filtering. (Must be odd; will be set odd if supplied as even.) Default: 61 If .Length <= 1 there will be no smoothing, only interpolation. |
.order |
The order of the polynomials to be used for filtering. |
Uses Savitzgy-Golay polynomials to smooth the series, after interpolating to fill missing values and then, if they still exist, setting remaining missing values to zero.
The smoothed and filtered series as a vector.
William Cooper
DPsmoothed <- SmoothInterp (RAFdata$DPXC)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.