[R] how to slice a zoo object

2011-01-24 Thread Blair Sutton
Hi Would anyone have any pointers on how to slice up a large zoo table. I have the following structure: - str(ZOO_OBJ)  zoo [1:632, 1:83] 30.4 30.4 30.4 30.4 30.3 ...  - attr(*, dimnames)=List of 2   ..$ : NULL   ..$ : chr [1:83] COL1 COL2 COL3 COL4 ...  - attr(*, index)= POSIXct[1:632],

Re: [R] how to slice a zoo object

2011-01-24 Thread Blair Sutton
I've solved my own problem using ZOO_OBJ[,COL2, COL5]. The trick was preceding the list of names with a comma as described in the standard ts document. On Mon, Jan 24, 2011 at 9:51 AM, Blair Sutton blai...@gmail.com wrote: Hi Would anyone have any pointers on how to slice up a large zoo table

Re: [R] how to slice a zoo object

2011-01-24 Thread Blair Sutton
My previous post had a typo. So as not to confuse future readers of the list it should have read ZOO_OBJ[,cbind(COL2, COL5)]. Thanks Gabor. On Mon, Jan 24, 2011 at 10:54 AM, Blair Sutton blai...@gmail.com wrote: I've solved my own problem using ZOO_OBJ[,COL2, COL5]. The trick was preceding

[R] Finding points where two timeseries cross over

2010-08-04 Thread Blair Sutton
Hi Is there any way to find out at what points two timeseries cross over perhaps with some information on how they cross? Alternatively, I could write a loop that solves pairs of adjacent points using linear algebra but looking for a simpler way. Thanks in advance, Blair [[alternative