Re: [R] Repeated Indexing / Sequence Operation

2010-12-31 Thread Charles C. Berry
On Fri, 31 Dec 2010, Paolo Rossi wrote: Hi Everyone, quick question before the end of the year. I have soem indices to select data from a bigger sample. I want to select n days before each index and n days after the index. Any clever way to do it. For heavy duty applications involving interv

Re: [R] Repeated Indexing / Sequence Operation

2010-12-31 Thread Gabor Grothendieck
On Fri, Dec 31, 2010 at 1:03 PM, Paolo Rossi wrote: > Hi Everyone, > > quick question before the end of the year. > > I have soem indices to select data from a bigger sample. I want to select n > days before each index and n days after the index. Any clever way to do it. > A for loop would do but

Re: [R] Repeated Indexing / Sequence Operation

2010-12-31 Thread Duncan Murdoch
On 31/12/2010 1:03 PM, Paolo Rossi wrote: Hi Everyone, quick question before the end of the year. I have soem indices to select data from a bigger sample. I want to select n days before each index and n days after the index. Any clever way to do it. A for loop would do but I wanted to know if t

Re: [R] Repeated Indexing / Sequence Operation

2010-12-31 Thread Paolo Rossi
in my pevious message the line with SampleWidth should be SampleWidth = 5 Paolo On 31 December 2010 18:03, Paolo Rossi wrote: > Hi Everyone, > > quick question before the end of the year. > > I have soem indices to select data from a bigger sample. I want to select n > days before each index and

[R] Repeated Indexing / Sequence Operation

2010-12-31 Thread Paolo Rossi
Hi Everyone, quick question before the end of the year. I have soem indices to select data from a bigger sample. I want to select n days before each index and n days after the index. Any clever way to do it. A for loop would do but I wanted to know if there is a moreR-friendly way to approach thi