Description Usage Arguments Details Value
This is a workhorse function used by impute_ndd
,
impute_qty
and others.
1 2 3 4 5 6 7 8 9 |
data |
A data frame containing columns |
variable |
Unquoted name of the column in |
method |
Method for imputing the values. See details. |
where |
Logical vector, or function applied to |
group |
Level of structure for imputation. Defaults to whole study population. |
... |
Extra arguments, currently ignored |
replace_with |
if the method 'replace' is selected, which value should be inserted?
|
The argument where
indicates which values are to be imputed.
It can be specified as either a vector or as a function. Thus you can
specify, for example, is.na
to impute all missing values, or
you can pass in a vector, if it depends on something else rather than just
the current values of the variable to imputed.
This design may change in future. In particular, if we want to impute
implausible values and impute missing values separately, it's important that
these steps are independent.
A data frame of the same structure as data
, with values imputed
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.