How to get milliseconds using as.POSIXct or as.POSIXlt in r? -
i want subseconds use 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 output not contain "07:53:42.700000"?
same problem 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"
how (corrected per frank's direction):
d <- as.posixct(sys.time()) format(d,"%y-%m-%d %h:%m:%os6") [1] "2015-05-30 18:06:08.693852"
Comments
Post a Comment