nndist(x, y=NULL, method="C")
x
and y
would be
numeric vectors of equal length. Alternatively y
may be
omitted and x
may be
a point patter"C"
and "interpreted"
. If method = "interpreted"
then the distances are
computed using interpreted R code only. If method="C"
then C code is used. The C code is faster by two to three orders of magnitude
and uses much less memory.
pairdist
,
Gest
x <- runif(100)
y <- runif(100)
d <- nndist(x, y)
data(cells)
d <- nndist(cells)
Run the code above in your browser using DataLab