vec_in() returns a logical vector based on whether
needle is found in
vec_match() returns an integer vector giving location of
NA if it's not found.
vec_match(needles, haystack) vec_in(needles, haystack)
A vector the same length as
vec_in() returns a
vec_match() returns an integer vector.
In most cases, missing values are not considered to be equal, i.e.
NA == NA is not
TRUE. This behaviour would be unappealing here,
so these functions consider all
NAs to be equal. (Similarly,
NaN are also considered to be equal.)