[R] Wrong computation of time differenze in POSIXct - additional digits
Julia
Julia.Schmitt at gmx.de
Fri Jun 15 18:49:05 CEST 2012
Hello,
I wanted to compute the time differenze between to times:
first =as.POSIXct( "2012-06-15 16:32:39.0025 CEST")
second = as.POSIXct("2012-06-15 16:32:39.0086 CEST")
second - first
The result is
Time difference of 0.006099939 secs
instead of just 0.0061 secs
So R adds aditional numbers after the result.
I know I could round it in this case.
But I am working with a large data set and need to always get the
correct result.
difftime() does not work correct either.
Has anybody a suggestion how to get the correct result?
Thank you
Julia
More information about the R-help
mailing list