Awesome - thanks!
Paolo
On 17 November 2010 19:44, Ray Brownrigg ray.brownr...@ecs.vuw.ac.nzwrote:
On Thu, 18 Nov 2010, Paolo Rossi wrote:
I sent a post to find a clever way to compute a Rolling Average of
columns
in a matrix and I was given the solution below which I am very pleased
On Wed, Nov 17, 2010 at 2:27 PM, Paolo Rossi
statmailingli...@googlemail.com wrote:
I sent a post to find a clever way to compute a Rolling Average of columns
in a matrix and I was given the solution below which I am very pleased
with.
There is a zoo function that does this. The following
I sent a post to find a clever way to compute a Rolling Average of columns
in a matrix and I was given the solution below which I am very pleased
with.
RollingAverage - function(x, RollingObs) {
cx - cumsum(x);
N - length(x);
Temp - (cx[RollingObs:N] - c(0, cx[1:(N-RollingObs)]))/RollingObs
You've tried?
apply(a, 2, RollingAverage, 7)
On Wed, Nov 17, 2010 at 5:27 PM, Paolo Rossi
statmailingli...@googlemail.com wrote:
I sent a post to find a clever way to compute a Rolling Average of columns
in a matrix and I was given the solution below which I am very pleased
with.
On Thu, 18 Nov 2010, Paolo Rossi wrote:
I sent a post to find a clever way to compute a Rolling Average of columns
in a matrix and I was given the solution below which I am very pleased
with.
RollingAverage - function(x, RollingObs) {
cx - cumsum(x);
N - length(x);
Temp -
5 matches
Mail list logo