Find closest matches between numeric vectors
Source:R/find_closest_match_dbl_2.R
find_closest_match_dbl_2.Rd
find_closest_match_dbl_2()
identifies the closest matches between two
numeric
vectors.
Matches are determined by calculating the absolute differences between reference and target values. A user-defined tolerance sets the maximum acceptable difference for a match. The closest match is the pair with the smallest absolute difference that falls within the specified tolerance.
Value
If any value was found, returns the index of the closest match in
x_ref
/y_ref
. Else, returns NA
.
See also
Other match functions:
match_strings()