I am having difficulty having a sequence occur in order when using sub seconds with POSIXct.
options(digits.secs=6)
x <- xts(1:10, as.POSIXct("2011-01-21") + c(1:10)/1e3)
Produces the following output, why aren't the times in order?
[,1]
2011-01-21 00:00:00.000 1
2011-01-21 00:00:00.002 2
2011-01-21 00:00:00.003 3
2011-01-21 00:00:00.003 4
2011-01-21 00:00:00.005 5
2011-01-21 00:00:00.006 6
2011-01-21 00:00:00.006 7
2011-01-21 00:00:00.007 8
2011-01-21 00:00:00.009 9
2011-01-21 00:00:00.009 10
I would expect the same output the code below produces
c(1:10)/1e3
[1] 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.010