Find the topn matches in y
for each record in x
.
1 2  gower_topn(x, y, pair_x = NULL, pair_y = NULL, n = 5, eps = 1e08,
nthread = getOption("gd_num_thread"))

x 

y 

pair_x 

pair_y 

n 
The topn indices and distances to return. 
eps 

nthread 
Number of threads to use for parallelization. By default,
for a dualcore machine, 2 threads are used. For any other machine
n1 cores are used so your machine doesn't freeze during a big computation.
The maximum nr of threads are determined from 
A list
with two array elements: index
and distance
. Both have size n X nrow(x)
. Each ith column
corresponds to the topn best matches of x
with rows in y
.
1 2 3 4  # find the top 4 best matches in the iris data set with itself.
x < iris[1:3,]
lookup < iris[1:10,]
gower_topn(x=x,y=lookup,n=4)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.