# NOT RUN {
# select variables starting with a particular string.
impute_mean_all(airquality)
impute_mean_at(airquality,
.vars = c("Ozone", "Solar.R"))
# }
# NOT RUN {
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()
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab