[R] erratic behavior of match()?
Bernhard.Klingenberg at williams.edu
Thu Apr 19 03:02:15 CEST 2007
Consider the code:
x <- seq(0,1,0.2)
y <- seq(0,1,0.01)
which, surprisingly, doesn't show a match at 0.6! (It gives correct
matches at 0, 0.2, 0.4, 0.8 and 1, though)
yields FALSE. (but x==y, the one for 0.8, yields TRUE)
Is this a consequence of machine error or something else?
Could this be overcome? (It works correctly when integers are used in
the sequences as well as in many other circumstances)
More information about the R-help