This function matches the elements of two numeric vectors as well as possible (that means with the smallest possible sum of absolute deviations).
Arguments
- x, y
[
numeric()]
Two vectors of the same length without missing values.
Value
An integer vector of length length(x) with the positions of
y in x, i.e., the \(i\)-th element is the position of the
element of x that is matched with the \(i\)-th element of y
(hence, x[match_numerics(x, y)] is aligned with y).
