[Rd] Arithmetic bug? (found when use POSIXct) (PR#10776)
bozhou1981 at hotmail.com
bozhou1981 at hotmail.com
Sun Feb 17 21:50:13 CET 2008
Hi Gabo,
FAQ 7.31 does not apply to this. "numeric" in R is 64bit which is large eno=
ugh to handle this.
I
figured out the cause is that Sys.time() gives millisecond value while
b<-as.POSIXct(format(a,tz=3D"GMT")) cuts off that part.=20
Then of course a-b is not 5 hours!
Do it again with "options(digits=3D22)" and you will see what actually happ=
ened there.
The recommended code from R News is not aware the truth that POSIXlt can re=
present sub-second time.
Cheers,
B
_________________________________________________________________
Helping your favorite cause is as easy as instant messaging.=A0You IM, we g=
ive.
[[alternative HTML version deleted]]
More information about the R-devel
mailing list