# select variables starting with a particular string.
impute_mean_all(airquality)
impute_mean_at(airquality,
.vars = c("Ozone", "Solar.R"))
if (FALSE) {
library(dplyr)
impute_mean_at(airquality,
.vars = vars(Ozone))
impute_mean_if(airquality,
.predicate = is.numeric)
library(ggplot2)
airquality %>%
bind_shadow() %>%
impute_mean_all() %>%
add_label_shadow() %>%
ggplot(aes(x = Ozone,
y = Solar.R,
colour = any_missing)) +
geom_point()
}
Run the code above in your browser using DataLab