which.closest {birk} | R Documentation |
Returns index of the closest value to x
.
which.closest(vec, x)
vec |
a numeric vector. |
x |
numeric. The value for which the closest match should be returned. |
Matthew A. Birk, matthewabirk@gmail.com
which.closest(10:1, 3.3)