Extends the functionality of match to identify
all matching values, instead of just the first one.
Usage
matchAll(x, table)
Arguments
x
A vector.
table
The lookup table as a vector.
Details
Returns an integer vector of the index in table for all
the matches. The result is not sorted in numerical index order when
more than one value is sought to be matched.
Instead, the matches of the first value in x are listed first,
followed by matches to the second value in x and so on.
Values of NA are treated as data.