Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

impute_below_if

Scoped variants of impute_below


Description

impute_below operates on all variables. To only impute variables that satisfy a specific condition, use the scoped variants, impute_below_at, and impute_below_if.

Usage

impute_below_if(.tbl, .predicate, prop_below = 0.1, jitter = 0.05, ...)

Arguments

.tbl

data.frame

.predicate

A predicate function (such as is.numeric)

prop_below

the degree to shift the values. default is

jitter

the amount of jitter to add. default is 0.05

...

extra arguments

Value

an dataset with values imputed

Examples

airquality %>%
  impute_below_if(.predicate = is.numeric)

naniar

Data Structures, Summaries, and Visualisations for Missing Data

v0.6.0
MIT + file LICENSE
Authors
Nicholas Tierney [aut, cre] (<https://orcid.org/0000-0003-1460-8722>), Di Cook [aut] (<https://orcid.org/0000-0002-3813-7155>), Miles McBain [aut] (<https://orcid.org/0000-0003-2865-2548>), Colin Fay [aut] (<https://orcid.org/0000-0001-7343-1846>), Mitchell O'Hara-Wild [ctb], Jim Hester [ctb], Luke Smith [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.