Find the proportion of values of x
that are %out%
of the vector y
.
prop_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 proportion of x
absent in y
.
mean(x %out% y)
prop_out(c("VT", "NH", "ZZ", "ME"), state.abb)
#> [1] 0.25