impute_univariate: Univariate Imputation

Description Usage Arguments Value Examples

Description

Fills missing values of a vector of any type by sampling with replacement from the non-missing values. Requires at least one non-missing value to run.

Usage

1

Arguments

x

A vector of any type possibly containing missing values.

Value

A vector of the same length and type as x but without missing values.

Examples

1
2
3
impute_univariate(c(NA, 0, 1, 0, 1))
impute_univariate(c("A", "A", NA))
impute_univariate(as.factor(c("A", "A", NA)))

kvantas/missTune documentation built on May 12, 2019, 10:51 a.m.