Martin Maechler <maechler@stat.math.ethz.ch> writes:
BDR> Oh, and what do bincode and bincode2 do about rounding error?
BDR> (Nothing, I think.)
You are right: nothing. [src/appl/binning.c]
However, do you think they *should* do anything at all?
If a 'break' ("cut point") is close to a data value, there's still only one
side of the break that the data value can go....
I think we probably should implement a fuzz-factor here to avoid sillyness
like
cut(0.35, breaks=seq(0,1,0.05),right=F)
[1] [0.3,0.35)
Levels: [0,0.05) [0.05,0.1) [0.1,0.15) [0.15,0.2) [0.2,0.25) [0.25,0.3) [0.3,0.35) [0.35,0.4) [0.4,0.45) [0.45,0.5) [0.5,0.55) [0.55,0.6) [0.6,0.65) [0.65,0.7) [0.7,0.75) [0.75,0.8) [0.8,0.85) [0.85,0.9) [0.9,0.95) [0.95,1)
.. which currently happens because
0.35 - 7*0.05
[1] -5.551115e-17
This doesn't happen in Splus, but that's just because it won't do
right=F...:
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._