[R] data.table exact matching numeric keys
James Hirschorn
james.hirschorn at hotmail.com
Thu May 26 19:01:48 CEST 2016
I have looked over the documentation and did not see an answer to this
seemingly basic question:
I noticed that if I have a data.table with a key containing numeric
values, then a close number is considered a match when searching. For
example,
> dt[J(a)]
# certainty probability
# 1: 0.8596491 -1
# 2: 0.8596491 -1
But in fact the two certainty values differ by 5.797585e-13.
Is there a way to only return exact matches, or set the epsilon value
(to something like machine epsilon)?
More information about the R-help
mailing list