Re: [R] Idioms for a timeseries operation - moving window

2008-03-02 Thread Bo Zhou
[5,]567 [6,]678 [7,]789 [8,]89 10 > > Date: Sun, 2 Mar 2008 10:04:38 -0500 > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: Re: [R] Idioms for a timeseries operation - moving window > CC: r-help@r-project.org >

Re: [R] Idioms for a timeseries operation - moving window

2008-03-02 Thread Gabor Grothendieck
e matrix is in revered order. Anyway to put the matrix in the original > order? Ie > 1 2 3 > 2 3 4 > ... > > > Cheers, > Bo > > > > > > Date: Sun, 2 Mar 2008 09:40:09 -0500 > > From: [EMAIL PROTECTED] > > To: [EMAIL PROTECTED] > > Sub

Re: [R] Idioms for a timeseries operation - moving window

2008-03-02 Thread Bo Zhou
987 [8,] 1098 > x [1] 1 2 3 4 5 6 7 8 9 10 The matrix is in revered order. Anyway to put the matrix in the original order? Ie 1 2 3 2 3 4 ... Cheers, Bo > Date: Sun, 2 Mar 2008 09:40:09 -0500 > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] >

Re: [R] Idioms for a timeseries operation - moving window

2008-03-02 Thread Gabor Grothendieck
(source, pdf) > > It's a typical windows xp install of R 2.6.1. > > Any idea why? > > Cheers, > > Bo > > > Date: Sun, 2 Mar 2008 09:40:09 -0500 > > From: [EMAIL PROTECTED] > > To: [EMAIL PROTECTED] > > Subject: Re: [R] Idioms for a

Re: [R] Idioms for a timeseries operation - moving window

2008-03-02 Thread Bo Zhou
tally Ordered Observations (source, pdf) It's a typical windows xp install of R 2.6.1. Any idea why? Cheers, Bo > Date: Sun, 2 Mar 2008 09:40:09 -0500 > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: Re: [R] Idioms for

Re: [R] Idioms for a timeseries operation - moving window

2008-03-02 Thread Gabor Grothendieck
See ?embed and from zoo see: ?rollapply ?rollmean ?rollmax There is a function coded in C in the caTools package for speed. On Sun, Mar 2, 2008 at 9:24 AM, Bo Zhou <[EMAIL PROTECTED]> wrote: > > Hi Guys, > > Need your wisdom on this. > > Say I have a time series (in zoo format) like this > > >

[R] Idioms for a timeseries operation - moving window

2008-03-02 Thread Bo Zhou
Hi Guys, Need your wisdom on this. Say I have a time series (in zoo format) like this > x <- zoo(11:21) > x 1 2 3 4 5 6 7 8 9 10 11 11 12 13 14 15 16 17 18 19 20 21 I want to do a "moving window sampling" of it. The result can either be a matrix or a dataframe like this my.super