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 ([EMAIL PROTECTED]) ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html