match() returns a vector of the positions of (first) matches of splits in
its first argument in its second.
%in% is a more intuitive interface as a binary operator, which returns
a logical vector indicating whether there is a match or not for each
split in its left operand.
Usage
match(x, table, ...)
# S3 method for Splits
match(x, table, ...)
x %in% table
# S3 method for Splits
%in%(x, table)
in.Splits(x, table)
Arguments
x, table
Object of class Splits.
…
Specify nomatch = to provide an integer value that will be
used in place of NA in the case where no match is found.
Value
match() returns an integer vector specifying the position in
table that matches each element in x, or nomatch if no match is found.
%in% returns a logical vector specifying which of the splits in
x are present in table.
Details
in.Splits() is an alias for %in%, included for backwards compatability.
It will be deprecated in a future release.
See Also
Corresponding base functions are documented in
match().