Returns the nearest pleace given a set of targets and a dataframe with coordinates. Uses sp spDistsN1 with Great Circle distance as default.

which_nearplace(coords, targets)

nearplace(coords, targets)

Arguments

coords

A nx2 matrix or data frame containing geocoordinates for n subjects.

targets

A mx2 matrix containing a set of geocoordinates for m target locations.