This function is a variant/extension of dplyr::na_if()
. Whereas that
version requires y
to be of length one, this function allows y
to be a
vector and replaces any elements of x
that are found in y
with NA
values.
This function can be very useful when cleaning data and
setting multiple any annoying values to NA
.
See also
Other functions for NA
handling:
na_replace()