[R-SIG-Finance] Adding milliseconds to zoo object

Brian G. Peterson brian at braverock.com
Wed Dec 26 15:59:52 CET 2007


Yuri Volchik wrote:
> I've read already some discussions concerning milliseconds as an index in
> zoo index and was wondering if there is a simple solution to differentiate
> ticks which come with 1 second timestamp resolution by adding index for rows
> with the same timestamp.
> One of the solutions would be just to create an index with length of
> nrows(x) and consider them as milli(micro)seconds, so my index will look
> like:
> 2007-12-24 06:14:00.154  22.00  
> 2007-12-24 06:14:00.155  22.00  
> 2007-12-24 06:15:00.156  22.00  
> 2007-12-24 06:15:00.157  22.00  
> 
> So with solution order of the observations(ticks) is preserved, though the
> solution is not very nice.
> Is there a way to create index in the following way?
> 2007-12-24 06:14:00.154  22.00  
> 2007-12-24 06:14:00.155  22.00  
> 2007-12-24 06:15:00.001  22.00  
> 2007-12-24 06:15:00.002  22.00  
> 
> So this index will be in effect number(position) of the tick in the second.

There was an extensive discussion on this list of millisecond support in 
zoo a few weeks ago.  Have you reviewed the suggestions posted in that 
thread, including by Gabor (one of the authors of zoo), Dirk, and other 
experienced users?

Regards,

    - Brian



More information about the R-SIG-Finance mailing list