Skip to content
Prev 24411 / 29559 Next

For each point, distance to nearest point in second dataset

For other's reference, that was almost right:

To get distance from each voter to closest polling place, the syntax was:

knn.results = knn(data=coordinates(polling.places),
query=coordinates(voters), k=1)
On Thu, May 19, 2016 at 3:03 PM Nick Eubank <nickeubank at gmail.com> wrote: