Skip to content
Prev 82872 / 398503 Next

millions of comparisons, speed wanted

Dear Andy,
On Thursday 15 December 2005 20:57, Liaw, Andy wrote:
Thanks for the idea, I played a little with it. At the beginning yes, the data 
are all 0/1, but during the minimizing iterations there are also "x" values; 
for example comparing:
0 1 0 1 1
0 0 0 1 1
should return
0 "x" 0 1 1

whereas
0 "x" 0 1 1
0 0 0 1 1
shouldn't even be compared (they have different number of figures).

Replacing "x" with NA in dist is not yielding results either, as with
NA 0 0 1 1
0 0 0 1 1
dist returns 0.

I even wanted to see if I could tweak the dist code, but it calls a C program 
and I gave up.

Nice idea anyhow, maybe I'll find a way to use it further.
Best,
Adrian