replace_na: Replace NAs

Description Usage Arguments Value

View source: R/replace_na.R

Description

This function replaces na values with either the min, max, median or average value or removes the rows.

Usage

1
replace_na(data, columns, replace = "mean", remove = FALSE)

Arguments

data

(tbl_df, df, data.frame) dataframe that the function will use to replace NAs

columns

(vector or list) columns that specify which column to replace

replace

(character) the method to replace missing values with

remove

(logical) set TRUE to remove missing value rows

Value

A list of tuples where each NAs will be replaced by either min, max, median or average.


UBC-MDS/CleanR documentation built on May 7, 2019, 7:13 p.m.