Re: [R] Computing Rolling Average

2010-11-17 Thread Paolo Rossi
.org > > [mailto:r-help-boun...@r-project.org] On Behalf Of Ray Brownrigg > > Sent: Tuesday, November 16, 2010 12:05 PM > > To: r-help@r-project.org > > Subject: Re: [R] Computing Rolling Average > > > > On Wed, 17 Nov 2010, Paolo Rossi wrote: > > > Hi,

Re: [R] Computing Rolling Average

2010-11-16 Thread William Dunlap
5 PM > To: r-help@r-project.org > Subject: Re: [R] Computing Rolling Average > > On Wed, 17 Nov 2010, Paolo Rossi wrote: > > Hi, > > Can anyone suggest a clever way to compute a rolling > weekly average of the > > columns in a matrix? The column bit is straightforw

Re: [R] Computing Rolling Average

2010-11-16 Thread Paolo Rossi
Definitely out of sequence - it should be [,1] [,2] [1,]4 21 [2,]5 22 [3,]6 23 [4,]7 24 [5,]8 25 [6,]9 26 [7,] 10 27 [8,] 11 28 [9,] 12 29 [10,] 13 30 [11,] 14 31 On 16 November 2010 20:12, David Winsemius wrote: > > On No

Re: [R] Computing Rolling Average

2010-11-16 Thread David Winsemius
On Nov 16, 2010, at 2:33 PM, Paolo Rossi wrote: Hi, Can anyone suggest a clever way to compute a rolling weekly average of the columns in a matrix? The column bit is straightforward – use apply given a function which does what you want on a column. With regard to a particular column, th

Re: [R] Computing Rolling Average

2010-11-16 Thread Ray Brownrigg
On Wed, 17 Nov 2010, Paolo Rossi wrote: > Hi, > Can anyone suggest a clever way to compute a rolling weekly average of the > columns in a matrix? The column bit is straightforward – use apply given a > function which does what you want on a column. With regard to a particular > column, the obviou