tags:

views:

2800

answers:

2

I'm trying to use R to calculate the moving average over a series of values in a matrix. The normal R mailing list search hasn't been very helpful though. What function in R or that is available as a package will allow me to calculate moving averages? Thanks

+6  A: 
f3lix
+1  A: 

I don't know R but isn't moving average calculated like this

ma = ma+(prec * (newval - ma))

ma - moving average

prec = precision

newval = newest value

dbasnett