Return the values of x
that are %out%
of the vector y
.
what_out(x, y, na.rm = TRUE, ignore.case = FALSE)
A vector to check.
A vector to compare against.
logical; Should NA
be ignored?
logical; if FALSE
, the pattern matching is case
sensitive and if TRUE
, case is ignored during matching.
The elements of x
that are %out%
y.
x[which(x %out% y)]
what_out(c("VT", "DC", NA), state.abb)
#> [1] "DC"