out: The Opposite of '%in%'

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Duh.

Usage

1
x %out% y

Arguments

x

vector or NULL: the values to be matched.

y

vector or NULL: the values to be matched.

Details

That %out% never returns NA makes it particularly useful in if conditions.

Value

A logical vector of the same length as x, indicating if a match was located for each element of x: thus the values are TRUE or FALSE and never NA.

Author(s)

Antoine Filipovic Pierucci

See Also

match. pmatch and charmatch for (partial) string matching, match.arg, etc for function argument matching. findInterval similarly returns a vector of positions, but finds numbers within intervals, rather than exact matches.

Examples

1
2
1:5 %out% 3:6
letters[letters %out% c("a", "b")]


Search within the rmngb package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.