divide_and_fill: Takes a dataframe, subsets selected columns and imputes...

Description Usage Arguments Value Examples

View source: R/instaeda.R

Description

Takes a dataframe, subsets selected columns and imputes missing values and returns a data frame.

Usage

1
2
3
4
5
6
7
divide_and_fill(
  dataframe,
  cols = NULL,
  strategy = "mean",
  random = FALSE,
  verbose = 0L
)

Arguments

dataframe

Dataframe from which to take columns and check for missing values.

cols

List of columns to perform imputation on. By default, NULL(perform on all numeric columns).

strategy

string. imputation strategy, one of: 'mean', 'median', 'random'. By default, 'mean'.

random

boolean, optional When random == True, shuffles data frame before filling. By default, False.

verbose

integer, optional Controls the verbosity of the divide and fill. By default, 0.

Value

data.frame Data frame obtained after divide and fill on the corresponding columns.

Examples

1
2
3
4
## Not run: 
divide_and_fill(example_dataframe)

## End(Not run)

UBC-MDS/instaeda_R documentation built on March 29, 2021, 7:55 a.m.