powered by
Find the length of the set of difference between x and y vectors.
x
y
count_diff(x, y, ignore.case = FALSE)
The number of unique values of x not in y.
A vector to check.
A vector to compare against.
logical; if FALSE, the pattern matching is case sensitive and if TRUE, case is ignored during matching.
FALSE
TRUE
sum(x %out% y)
Other counting wrappers: count_in(), count_na(), count_out(), na_in(), na_out(), na_rep(), prop_distinct(), prop_in(), prop_na(), prop_out(), what_in(), what_out()
count_in()
count_na()
count_out()
na_in()
na_out()
na_rep()
prop_distinct()
prop_in()
prop_na()
prop_out()
what_in()
what_out()
# only unique values are checked count_diff(c("VT", "NH", "ZZ", "ZZ", "ME"), state.abb)
Run the code above in your browser using DataLab