Find nearest neighbors
kd_nearest_neighbors(x, v, n) kd_nn_indices(x, v, n) kd_nearest_neighbor(x, v)
x | an object sorted by |
---|---|
v | a vector specifying where to look |
n | the number of neighbors to return |
#> [,1] [,2] #> [1,] 0.01327260 0.04300129 #> [2,] 0.09462277 0.17903429 #> [3,] 0.01952525 0.27264620 #> [4,] 0.19900078 0.17322484 #> [5,] 0.21833843 0.13334855 #> (continues for 95 more rows)#> [1] 0.5234284 0.4968253#> [,1] [,2] #> [1,] 0.5494615 0.5447052 #> [2,] 0.5160349 0.4530892 #> [3,] 0.5234284 0.4968253#> [,1] [,2] #> [1,] 0.3673290 0.5242801 #> [2,] 0.3915421 0.5144025 #> [3,] 0.5494615 0.5447052 #> [4,] 0.5160349 0.4530892 #> [5,] 0.5234284 0.4968253