[datatable-help] Suggestion on ITime class implementing.
statquant3
statquant at outlook.com
Sun Mar 24 10:38:39 CET 2013
I wrote almost the same message few month ago (so that Matthew knows that I
am not duplicating ids to trick him into implementing this :))
More seriously I recently discovered that R itself handles tdatetime very
wrongly.
It has the nice POSIXlt which stores date and time as a list (on 40 bytes
which is why data.table do not handle it)
R> lt = as.POSIXlt("2011-01-01 12:32.234354")
R> attributes(lt)
$names
[1] "sec" "min" "hour" "mday" "mon" "year" "wday" "yday" "isdst"
$class
[1] "POSIXlt" "POSIXt"
It has POSIXct which stores the datetime as a double but very often displays
the datetime wrongly
See my SO post
http://stackoverflow.com/questions/15383057/accurately-converting-from-character-posixct-character-with-sub-millisecond-da
and the one it links to
http://stackoverflow.com/questions/7726034/how-r-formats-posixct-with-fractional-seconds
Dirk Edd. wrote something (then deleted it) stating that Windows could not
handle more than milli-second datetimes and Linux "almost" micros. I never
understood this...
He is developing a RccpBDT that expose Boost::Datetime class to R that I
would like to try but it not mature enough (according to him).
So at the moment datetime are really a nasty thing that is not handled as
accurately as it should
--
View this message in context: http://r.789695.n4.nabble.com/Suggestion-on-ITime-class-implementing-tp4662281p4662320.html
Sent from the datatable-help mailing list archive at Nabble.com.
More information about the datatable-help
mailing list