[R] Problem with as.POSIXct()

circe tju_circe at hotmail.com
Wed Jun 1 12:19:52 CEST 2011


Hi, when I type in these words:

> a=c("2011-06-01 17:21:24.83", "2011-06-01 17:21:24.283")
> as.POSIXct(a)

the real output is:
   [1] "2011-06-01 17:21:24.830 CST" "2011-06-01 17:21:24.283 CST"
   
rather than the expected one:
   [1] "2011-06-01 17:21:24.083 CST" "2011-06-01 17:21:24.283 CST"

How can I deal with such milliseconds less than 100?

Thanks



--
View this message in context: http://r.789695.n4.nabble.com/Problem-with-as-POSIXct-tp3565424p3565424.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list