knn_lookup_rows: Nearest neighbour rows

Description Usage Arguments Details

Description

Lookup row numbers of nearest neighbours in a data.frame.

Usage

1
2
knn_lookup_rows(df, points, k, ignore.colnames = FALSE,
  square.distance = TRUE, ...)

Arguments

df

data.frame, preferably indexed using flanner, in which to look for neighbours

points

data.frame containing coordinates to lookup neighbours of

k

number of neighbours to find

ignore.colnames

whether to interpret points by column numbers of column names (defaults to the latter)

square.distance

whether to return distances squared (default, which is faster)

Details

the returned row number vector has a "distance" attribute containing the (possibly squared) euclidean (L^2) distances.


rossklin/flanner documentation built on May 27, 2019, 11:39 p.m.