View source: R/calc_distance.R
get_closest_point | R Documentation |
Output a vector with the id of points b that is the closest to points a
get_closest_point(lon_a, lat_a, lon_b, lat_b, id_b, max_dist = 30, ...)
lon_a |
points a longitude |
lat_a |
points a latitude |
lon_b |
points b longitude |
lat_b |
points b latitude |
id_b |
b ids used in the output. Should have the same size as lon_b and lat_b |
max_dist |
distances greater than this value in kilometers will be discarded and result will have NAs |
... |
additional arguments passed to geodist::geodist_vec() |
a vector the same size as lon_a and lat_a
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.