Closest.Rd
Find the closest value(s) of a number in a vector x. Multiple values will be reported, if the differences are the same.
Closest(x, a, which = FALSE, na.rm = FALSE)
the vector to be searched in
the reference value
a logical value defining if the index position or the value should be returned. By default will the value be returned.
a logical value indicating whether NA
values should be stripped before the computation proceeds.
the value or index in x which is closest to a