Example of using nanoflann and rcpp for a fast custom nearest neighbor index function in R.