This function provides a modified behaviour of
match
in the case of multiple matches,
where it returns the index of the first match.
match_first(x, table, nomatch = NA_integer_, incomparables = NULL)
NULL
: the values to be matched.
Long vectors are supported.NULL
: the values to be
matched against. Long vectors are not supported.integer
.x
matching a value in this
vector is assigned the nomatch
value. For
historical reasons, FALSE
is equivalent to
NULL
.