| na_if_in | R Documentation |
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.
na_if_in(x, y)
x |
Vector to modify. |
y |
Value to replace with |
A modified version of x that replaces any values that are found in y with NA.
Other functions for NA handling:
na_replace()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.