prepare_data: Prepare data for training or testing.

Description Usage Arguments Value

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



Search within the crtests package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.