[R] Savitzky-Golay Smoother
ggrothendieck at gmail.com
Sat Sep 27 01:23:35 CEST 2014
On Fri, Sep 26, 2014 at 3:32 AM, Erick Okuto <erickokuto at gmail.com> wrote:
> Dear Paul and Henrik,
> I have a time series with some missing data points that i need smoothed
> using Savitzky-Golay filter. Related question was asked here
> but no straight forward answer was posted. However, Henrik (cc'd here) did
> ask related question on smoothing for reflectance here
> which i have as well been unable to follow up. I will be glad if you could
> assist me with some insights on the way forward or point to a relevant
> source of help.
Not Savitzky-Golay but if z is a time series then
will fill in NAs with spline curve fits. See ?na.spline
There are other NA filling routines in zoo too:
> ls(pattern = "^na[.]", "package:zoo")
 "na.aggregate" "na.aggregate.default" "na.approx"
 "na.approx.default" "na.fill" "na.fill.default"
 "na.locf" "na.locf.default" "na.spline"
 "na.spline.default" "na.StructTS" "na.trim"
 "na.trim.default" "na.trim.ts"
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
email: ggrothendieck at gmail.com
More information about the R-help