The googleVis
package of R software is surprisingly good. However, I am puzzled by one problem of gvisMotionChart
about the timevar, because the time in my data set is POSIXlt
format, such as:
"2009-07-02 19:00:00" "2009-07-02 20:00:00" "2009-07-02 21:00:00" "2009-07-02 22:00:00" "2009-07-02 23:00:00"
Because the time unit is hour, if I transform the POSIXlt
format to date format(using as.date), the hours information will be deleted and make the data nonsense.
So my question is: how to deal with the POSIXlt
format time using gvisMotionChart
?