powered by
Replace missing values
replace_na(data, replace = list(), ...)
A data frame.
A named list given the value to replace NA with for each column.
NA
Additional arguments for methods. Currently unused.
# NOT RUN { library(dplyr) df <- tibble(x = c(1, 2, NA), y = c("a", NA, "b")) df %>% replace_na(list(x = 0, y = "unknown")) # }
Run the code above in your browser using DataLab