Clean up the input data by dropping observations with missing outcomes OUTCOME
,
convert desired columns into numerics (vars_to_numeric
),
convert all logical columns into binary integers
convert all character columns into factors
convert all factors into integers,
by defining additional dummy variables for every factor with > 2 levels.
1 2 | prepare_data(data, OUTCOME, vars_to_numeric, vars_to_int, skip_vars,
drop_vars = FALSE, verbose = FALSE)
|
data |
Input dataset, can be a |
OUTCOME |
Character name of the column of outcomes. |
vars_to_numeric |
Column name(s) that should be converted to numeric type. |
vars_to_int |
Column name(s) that should be converted to integer type. |
skip_vars |
These columns will not be converted into other types |
drop_vars |
Drop the variables in skip_vars and drop the factor variables that were re-coded into binary dummies from the resulting analytic dataset? |
verbose |
Print processing info |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.