Re: [R] Help using smooth.spline with zoo object

2009-04-04 Thread roger koenker
For equally spaced observations this is quite simple and available in various packages but I like Gabor Grothendieck's version (which didn't come up immediately in my Rseek search: hpfilter <- function(y,lambda=1600) eye <- diag(length(y)) solve(eye+lambda*crossprod(diff(eye,d=2)),y)} ur

Re: [R] Help using smooth.spline with zoo object

2009-04-04 Thread Gabor Grothendieck
Try this: library(zoo) library(lattice) z <- as.zoo(EuStockMarkets) xyplot(z) # original xyplot(z, type = "smooth") # smooth In zoo see ?xyplot.zoo and in lattice see ?panel.xyplot On Sat, Apr 4, 2009 at 3:19 PM, Rob Denniker wrote: > Can someone please show me how to smooth time series data t