From: Whit Armstrong <whit_at_twinfieldscapital.com>

Date: Thu 03 Mar 2005 - 09:22:43 EST

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Mar 03 09:31:21 2005

Date: Thu 03 Mar 2005 - 09:22:43 EST

Does anyone know an easy way to calculate the rolling 20 period average
or sum of a vector?

For instance:

x <- rnorm(1000)

y <- apply.subset(x,20,fun="sum")

[[alternative HTML version deleted]]

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Mar 03 09:31:21 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:30:39 EST
*