impute_below_at | R Documentation |
impute_below
impute_below
imputes missing values to a set percentage below the range
of the data. To impute many variables at once, we recommend that you use the
across
function workflow, shown in the examples for impute_below()
.
impute_below_all
operates on all variables. To only impute variables
that satisfy a specific condition, use the scoped variants,
impute_below_at
, and impute_below_if
. To use _at
effectively,
you must know that _at`` affects variables selected with a character vector, or with
vars()'.
impute_below_at(.tbl, .vars, prop_below = 0.1, jitter = 0.05, ...)
.tbl |
a data.frame |
.vars |
variables to impute |
prop_below |
the degree to shift the values. default is |
jitter |
the amount of jitter to add. default is 0.05 |
... |
extra arguments |
an dataset with values imputed
# select variables starting with a particular string.
impute_below_at(airquality,
.vars = c("Ozone", "Solar.R"))
impute_below_at(airquality, .vars = 1:2)
## Not run:
library(dplyr)
impute_below_at(airquality,
.vars = vars(Ozone))
library(ggplot2)
airquality %>%
bind_shadow() %>%
impute_below_at(vars(Ozone, Solar.R)) %>%
add_label_shadow() %>%
ggplot(aes(x = Ozone,
y = Solar.R,
colour = any_missing)) +
geom_point()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.