Last chance! 50% off unlimited learning
Sale ends in
It can be useful in exploratory graphics to impute data outside the range of
the data. impute_below_all
imputes all variables with missings to have
values 10\
values adds a new string or label.
impute_below_all(.tbl, prop_below = 0.1, jitter = 0.05, ...)
a data.frame
the degree to shift the values. default is
the amount of jitter to add. default is 0.05
additional arguments
an dataset with values imputed
# NOT RUN {
# you can impute data like so:
airquality %>%
impute_below_all()
# However, this does not show you WHERE the missing values are.
# to keep track of them, you want to use `bind_shadow()` first.
airquality %>%
bind_shadow() %>%
impute_below_all()
# This identifies where the missing values are located, which means you
# can do things like this:
# }
# NOT RUN {
library(ggplot2)
airquality %>%
bind_shadow() %>%
impute_below_all() %>%
# identify where there are missings across rows.
add_label_shadow() %>%
ggplot(aes(x = Ozone,
y = Solar.R,
colour = any_missing)) +
geom_point()
# Note that this ^^ is a long version of `geom_miss_point()`.
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab