The uniqueness restriction isn't enforced. That said you should probably perturb the times since some operations might make no sense and/or are difficult to handle (differencing data is one that isn't straightforward for instance)

?make.index.unique is a new(ish) function in the package that can assist. See a related thread on that as well. 

Jeff

Jeffrey Ryan    |    Founder    |    jeffrey.ryan@lemnica.com

www.lemnica.com

On Apr 15, 2011, at 7:49 PM, Noah Silverman <noah@smartmediacorp.com> wrote:

> Thanks Jeff, 
> 
> Good advice!
> 
> I did just read that xts requires  "a corresponding vector of unique times/dates". 
> 
> So, how would I manage this with multiple tics per time/date?
> 
> --
> Noah Silverman
> Smart Media Corp.
> WebClipping.com
> Tel: (323) 653-1900 x5207
> 
> On Apr 15, 2011, at 5:36 PM, Jeff Ryan wrote:
> 
>> Hi Noah. 
>> 
>> Take a look through the list archives, you'll find this is a very common question. 
>> 
>> My (biased) reply is use xts. Highly optimized for tick data, very fast (mostly C) and widely used/depended upon. 
>> 
>> Aside from that, zoo is stellar - though might be tougher with tick data and will also complain about duplicate times. 
>> 
>> fts and timeSeries are quite good as well, though different (fts is actually a wrapper to a C++ library by the same author). timeSeries is part of rmetrics, and is nice, though not really built for big/high freq data. 
>> 
>> ts, its, irts, are really quite old and exist only for particular legacy reasons best I can tell. 
>> 
>> data.table isn't a time series per se, but is quite a cool replacement for data.frames. 
>> 
>> Check the list (as recently as the last few posts even!), and give them all a test - that's the best part of OSS. 
>> 
>> Jeff
>> 
>> Jeffrey Ryan    |    Founder    |    jeffrey.ryan@lemnica.com
>> 
>> www.lemnica.com
>> 
>> On Apr 15, 2011, at 6:32 PM, Noah Silverman <noah@smartmediacorp.com> wrote:
>> 
>>> Hi,
>>> 
>>> I have some tick data that I want to analyze.
>>> 
>>> The file given to me has date and time in separate columns.
>>> There may be multiple transactions with the same date and time stamps
>>> 
>>> I tried using the its package to convert them into a nice time series object, but it complains about multiple items with the same index.
>>> 
>>> Does anyone have any guidance as to how to best do this in R??
>>> 
>>> Below are a few lines of the data
>>> symbol as_of_date as_of_time close_price volume
>>> 1  WCH07 2007-01-01   18:32:01      882.50     20
>>> 2  WCH07 2007-01-01   18:32:01      882.50      5
>>> 3  WCH07 2007-01-01   18:32:06      882.75      2
>>> 4  WCH07 2007-01-01   18:32:06      883.00      1
>>> 5  WCH07 2007-01-01   18:32:06      883.00      2
>>> 6  WCH07 2007-01-01   18:32:07      883.00      1
>>> 
>>> Thanks!
>>> 
>>> -N
>>> _______________________________________________
>>> R-SIG-Finance@r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>>> -- Subscriber-posting only. If you want to post, subscribe first.
>>> -- Also note that this is not the r-help list where general R questions should go.
> 

	[[alternative HTML version deleted]]

