Checks the Dataset and sets attributes on it for use in explore_data

check_data(dataset, covariates = NULL, outcome_var = NULL)

Arguments

dataset
  • dataset

covariates
  • optional. Character vector containing columns to subset dataset to. If NULL, then all columns will be used.

outcome_var
  • optional. Character vector containing columns of outcome. These columns must be factors or characters. If NULL, all categorical variables are used as possible outcomes

Value

data.table with the following attributes: outcome_var (validated outcomes),

Examples

library(ggplot2) data(diamonds) diamond_frame <- check_data(diamonds, outcome_var=c("cut")) attr(diamond_frame, "categoricalVars")
#> [1] "clarity" "color" "cut"
attr(diamond_frame, "numericVars")
#> [1] "carat" "depth" "price" "table" "x" "y" "z"
attr(diamond_frame, "outcome_var")
#> [1] "cut"