A bizzarre behavior I just observed in R.
Started with:
d <- data.frame(x = rep(seq(1, 20, 0.2), 10))
subset(d, d$x == 17.4)
which returns nothing, even though 17.4 is clearly in the data frame. Same happens for 18.4 as well, and a few other values.
Same thing for:
x <- seq(1, 20, 0.2)
print(17.4 %in% x)
returns FALSE.
Checked on ideone.com, so no problem with my interpreter or anything.
Interestingly, if 17.4 is treated as a string, so do
"17.4" %in% x
that returns TRUE.
In this case x[83] is 17.4 and both str(x[83]) and str(17.4) are of course 'num', but:
x[83] == 17.4
returns FALSE.
I'm super baffled at what this small thing is about.