Skip to content
Prev 82870 / 398503 Next

millions of comparisons, speed wanted

Just some untested idea:

If the data are all 0/1, you could use dist(input, method="manhattan"), and
then check which entry equals 1.  This should be much faster than creating
all pairs of rows and check position-by-position.

HTH,
Andy

From: Adrian DUSA