pipe_NA_indicators: Indicate which fields are NA

Description Usage Arguments Details Value

View source: R/feature_generation.R

Description

Takes the dataset, scans the given columns for values that have been listed as indicating NA, and adds a column indicating if this is a NA

Usage

1
2
pipe_NA_indicators(train, condition = is.na, columns = colnames(train),
  force_column = F)

Arguments

train

The train dataset, as a data.frame or data.table. Data.tables may be changed by reference.

condition

Function to test if a value is missing. Should return true when a value is missing and false otherwise.

columns

Names of the columns to check for missing values.

force_column

If true, always add new columns, even if no missing values were found.

Details

Generated columns will be of type logical.

Value

A list containing the transformed train dataset and a trained pipe.


jeroenvdhoven/datapiper documentation built on July 14, 2019, 9:34 p.m.