Re: [R] moving average method for time series objects

2004-09-24 Thread Kjetil Brinchmann Halvorsen
Schwarz,Paul wrote: Dear R-Help readers, I suspect that this question must be a FAQ, but my investigation of the archives has not been very revealing. Is there an R function for calculating moving averages of time series objects? library(gregmisc) ?running test - ts(rnorm(100)) test2 -

RE: [R] moving average method for time series objects

2004-09-24 Thread Brahm, David
Paul Schwarz [EMAIL PROTECTED] wrote: Is there an R function for calculating moving averages of time series objects? Others have replied, but here's the simple answer for a trailing 5-day moving average, no non-standard packages needed: R x - 1:20 R filter(x, rep(1/5,5), sides=1) -- David Brahm

Re: [R] moving average method for time series objects

2004-09-24 Thread Martin Maechler
Kjetil == Kjetil Brinchmann Halvorsen [EMAIL PROTECTED] on Fri, 24 Sep 2004 08:34:19 -0400 writes: Kjetil Schwarz,Paul wrote: Dear R-Help readers, I suspect that this question must be a FAQ, but my investigation of the archives has not been very revealing. Is

Re: [R] moving average method for time series objects

2004-09-23 Thread Gabor Grothendieck
Schwarz,Paul Paul.Schwarz at gartner.com writes: : : Dear R-Help readers, : : I suspect that this question must be a FAQ, but my investigation of the archives has not been very revealing. : Is there an R function for calculating moving averages of time series objects? : : Thank you for your