[R] Fwd: probably "round()" bug
Andrea Rossetti
rossetti at stud.unipg.it
Thu Oct 15 15:30:59 CEST 1998
>Date: Thu, 15 Oct 1998 15:30:22 +0200
>To: Guido Masarotto <guido at sirio.stat.unipd.it>
>From: Andrea Rossetti <rossetti at stud.unipg.it>
>Subject: probably "round()" bug
>
>Hi to all R people,
>I'm using the Guido Masarotto's compiled R, version 0.62.3.
>there is a probably bug in round function, in fact I've done:
>
>> round(0.5)
>[1] 0.5
>> round(-1.5)
>[1] -1.5
>
>In the documentation is writed:
>
>.........
>round' rounds the values in its first argument to the
> specified number of decimal places (default 0). Note
> that for rounding off a 5, the IEEE standard is used,
> ``go to the even digit''. Therefore `round(0.5)' is
> `0' and `round(-1.5)' is `-2'.
>.........
>
>any suggestion is appreciated!
>
>Andrea Rossetti.
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list