Re: [R] Finding the nearest data in intraday data from two zoo objects

2010-11-24 Thread Gabor Grothendieck
On Wed, Nov 24, 2010 at 11:04 AM, Santosh Srinivas wrote: > Hello Group, > > I have the following options and future data in zoo objects > >> head(optData.z) >                       ExpDt OptTyp Strike TrdPrice TotTrdQty > 2009-01-01 09:55:03 20090129      1   2900 180.        50 > 2009-01-01

Re: [R] Finding the nearest data in intraday data from two zoo objects

2010-11-24 Thread Matthew Dowle
Try data.table with the roll=TRUE argument. Set your keys and then write : futData[optData,roll=TRUE] That is fast and as you can see, short. Works on many millions and even billions of rows in R. Matthew http://datatable.r-forge.r-project.org/ "Santosh Srinivas" wrote in message news:

[R] Finding the nearest data in intraday data from two zoo objects

2010-11-24 Thread Santosh Srinivas
Hello Group, I have the following options and future data in zoo objects > head(optData.z) ExpDt OptTyp Strike TrdPrice TotTrdQty 2009-01-01 09:55:03 20090129 1 2900 180.50 2009-01-01 09:55:31 20090129 1 2900 188.50 2009-01-01 09:55:37