How to get milliseconds using as.POSIXct or as.POSIXlt in r?
I want to get subseconds, so I use the following:
> options(digits.secs=6)
> as.POSIXlt(df1$Global.Time[5]/1000, origin="1970-01-01", tz="America/Los_Angeles")
[1] "2005-06-15 07:53:42.7 PDT"
Why doesn't the output contain something like "07: 53: 42.700000"?
Same problem with POSIXct
:
> as.POSIXct(df1$Global.Time[3]/1000, origin="1970-01-01", tz="America/Los_Angeles")
[1] "2005-06-15 07:53:42.5 PDT"
+3
source to share