roughImpute: Unsupervised median/mode imputation for dataframes

Description Usage Arguments Value Examples

View source: R/roughImpute.R

Description

Imputes missing values integer/numeric columns with their median. Imputes missing calues in character/factor columns with their mode. If a column does not contain even one non-missing value, then error is thrown.

Usage

1
roughImpute(dataset)

Arguments

dataset

A dataframe

Value

A dataframe (also inherits data.table class)

Examples

1
2
iris_missing <- missRanger::generateNA(iris, p = 0.2, seed = 1)
roughImpute(iris_missing)

talegari/forager documentation built on May 3, 2019, 4:01 p.m.