## S3 method for class 'lpp':
nnwhich(X, ..., k=1, method="C")"lpp")."interpreted" or "C".kth nearest neighbour.X, identifying the nearest neighbour of each point.
If nnwhich(X)[2] = 4 then the nearest neighbour of
point 2 is point 4. Alternatively a matrix with one row for each point in X
and one column for each entry of k.
method="C" the task is performed using
code in the C language. If method="interpreted" then the
computation is performed using interpreted Rcode. The Rcode is
much slower, but is provided for checking purposes.lppexample(lpp)
nnwhich(X)
nnwhich(X, k=2)Run the code above in your browser using DataLab