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 -
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
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
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