Finds the k nearest neighbours for every point in a given dataset using Jose Luis' 'nanoflann' library. There is support for exact searches, fixed radius searches with 'kd' trees and two distances, the 'Euclidean' and 'Manhattan'. For more information see < https://github.com/jlblancoc/nanoflann>. Also, the 'nanoflann' library is exported and ready to be used via the linking to mechanism.

Rnanoflann is a wrapper for C++'s library nanoflan which performs nearest neighbors search using kd-trees.
You can use the exported Rnanoflann::nn function or directly nanoflan via LinkignTo mechanism.
Rnanoflann export the function nn that performs nearest neighbors search with options:
M x d matrix where each of the M rows is a point.N x d matrix that will be queried against data. d, the number of columns, must be the same as data. If missing, defaults to data.FALSEstandard and radius.0.0.Add in Description in LinkingTo section the Rnanoflann and then:
#include "nanoflann.hpp". Refer to nanoflan for more details.Rnanoflann::nn via C++. Just #include "Rnanoflann.h". The available implemented function are use Rcpp and RcppArmadillo. For custom matrices you need to implement you own adaptor (see above).