na_ifs | R Documentation |
This function replaces specific values in a variable with NA. It would most commonly be used
to remove missing values indicated with codes such as "NA", -999 or "none".
(NB: It is very similar to dplyr's na_if
but accepts more than one value.)
na_ifs(x, replace)
x |
The variable to transform. |
replace |
One or more values to replace by NA. |
library(dplyr)
ess_health %>%
mutate(eisced = na_ifs(eisced, c(7, 55)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.