# select variables starting with a particular string.
impute_median_all(airquality)
impute_median_at(airquality,
.vars = c("Ozone", "Solar.R"))
library(dplyr)
impute_median_at(airquality,
.vars = vars(Ozone))
impute_median_if(airquality,
.predicate = is.numeric)
library(ggplot2)
airquality %>%
bind_shadow() %>%
impute_median_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