This is a really stupid problem in R but I don't know how to fix it. I'm having the following code:
library(lubridate)
options(digits.secs = 3)
start <- strptime("2013-12-10 01:59:26.901", format = "%Y-%m-%d %H:%M:%OS", tz = "America/Chicago")
end <- strptime("2013-12-10 01:59:27.729", format = "%Y-%m-%d %H:%M:%OS", tz = "America/Chicago")
When I do end - start
I expect the output to be 0.828
seconds but instead I get 0.8280001
.
EDIT: I know why it happens now, but not how to fix it. How do I fix this?
Thank you!