fast_missing_impute: Modifies missing data by removing or imputing with mean,...

Description Usage Arguments Value Examples

View source: R/fast_missing_impute.R

Description

The function takes in a dataframe, a list of column names to modify, and a method of imputation. The choices of imputation method are either remove (removes all rows with missing data), mean, median, mode, or multiple imputation.

Usage

1
fast_missing_impute(df, method, cols)

Arguments

df

The dataframe of interest

method

The method of imputation from: remove, mean, median, mode

cols

The column names with missing data to be modified

Value

df

Examples

1
2
fast_missing_impute(df = iris, method = "mean", cols = c("Sepal.Length", "Sepal.Width"))
fast_missing_impute(df = mtcars, method = "median", cols = c("hp", "gear", "carb"))

UBC-MDS/redahelper documentation built on April 2, 2020, 3:59 a.m.