[datatable-help] Dealing with dateTime
colin umansky
statquant at gmail.com
Thu Jan 3 12:17:01 CET 2013
Hello,
I have been thinking about how data.table deals with dateTime and would
like to share my questions/opinions.
Where I think data.table is (likely to be wrong :))
At the moment data.table deals independently with IDate and ITime
(%H:%M:%S) that are simple (Matthew Doyle words) derived class. As I
understand it they are stored as integers to enable fast radix sorting
etc...
There is no milli/micro/nano which is a problem as far as financial time
series are concerned.
Suggestions:
Would that be possible to store a IDateTime as the number of micro since
epoch-time ?
an IDateTime object would be represented like a=as.IDateTime("2010-01-03
09:34:54.342697"), then
year: asIYear(a); #would display "2010"
month: as.IMonth(a); #would display "2010-01"
date: as.IDate(a); #would display "2010-01-03"
etc...
Having all those built-in types would probably be useful to efficient
grouping.
PS:
The best soft I have experienced, to deal with timeseries, data is kdb (
http://kx.com/)
I particularly like the way datetimes are handled (
http://code.kx.com/wiki/JB:QforMortals/atoms#time), it may be a source of
inspiration...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20130103/748410fc/attachment.html>
More information about the datatable-help
mailing list