prepare_data: Prepare data for training or testing.

Description Usage Arguments Value

View source: R/prepare_helpers.R

Description

This function removes all missing values, including those introduced after (optional) releveling

Usage

1
2
prepare_data(df, df_reference, dependent, relevel = TRUE,
  drop.nas = c("dependent", "predictors", "all", "none"))

Arguments

df

The data frame that is to be prepared

df_reference

An optional reference data frame, whose factor levels are to be applied to df

dependent

The dependent variable of the data

relevel

Logical. Should the df be releveled with df_reference's factor levels?

drop.nas

Character vector denoting of which columns the NAs should be removed. See drop_na for the available strategies

Value

A data frame stripped of missing values


crtests documentation built on May 29, 2017, 11:52 a.m.