On Wed, Nov 17, 2010 at 2:27 PM, 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.
>
There is a zoo function that does this. The following converts a to
zoo, performs t
Awesome - thanks!
Paolo
On 17 November 2010 19:44, Ray Brownrigg wrote:
> 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.
> >
> >
> > R
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 <-
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.
>
>
>
4 matches
Mail list logo