Count the total values of x
that are are %out%
of the vector y
.
count_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 sum of x
absent in y
.
sum(x %out% y)
count_out(c("VT", "NH", "ZZ", "ME"), state.abb)
#> [1] 1