knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Introduction

Our package intends to explore the pattern of missing values in users' dataset, imputes the missing values using three simple methods and compare the results of different methods.

We found Amelia and vis_dat packages that are similar but only visualize the missing data. We thought this would be better package for users who do not have much experience in data wrangling.

vis_missing()

Introduction

Explore the pattern of missing values in a dataset.

Function

vis_missing(df, colour="default", missing_val_char = NA)

Parameters:

Return:

Example

dfm <- data.frame(x = c(1, 2, 3), y = c(0, 10, NaN))
vis_missing(dfm, "", NaN)

impute_missing()

Introduction:

imputes the missing values in a specified column with three simple methods: complete case, mean imputation and median imputation

Function

impute_missing(dfm, col, method, missing_val_char)

Parameters:

Return:

Example

dfm <- data.frame(x = c(1, 2, 3), y = c(0, 10, NaN))
impute_missing(dfm, "y", "MIP", NaN)

compare_model()

Introduction:

Compare the results of different methods. * This function will call function impute_missing() for several methods and return a table with some statistical information of the specified feature before and after imputation of different methods

Function

compare_model()

Parameters:

Return:

Example

dfm <- data.frame(x = c(1, 2, 3), y = c(0, 10, NaN))
compare_model(dfm, "y", "MIP", "NaN")


UBC-MDS/hamr documentation built on May 25, 2019, 1:36 p.m.