get_closest_point: Get closest point b from points a

View source: R/calc_distance.R

get_closest_pointR Documentation

Get closest point b from points a

Description

Output a vector with the id of points b that is the closest to points a

Usage

get_closest_point(lon_a, lat_a, lon_b, lat_b, id_b, max_dist = 30, ...)

Arguments

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()

Value

a vector the same size as lon_a and lat_a


JMPivette/evavelo documentation built on April 8, 2023, 4:20 p.m.