View source: R/factors_to_indicators.R
factors_to_indicators | R Documentation |
Turns factors into indicator variables with reasonable names.
Supports parallelization using future
plans.
Based on code by Taylor Terry from 2013.
factors_to_indicators(
data,
predictors = colnames(data),
max_levels = 200L,
verbose = FALSE,
to_lower = FALSE,
data.table = FALSE
)
data |
. |
predictors |
. |
max_levels |
If a factor contains more than this many levels, issue a warning and don't convert it to indicators. |
verbose |
TBD |
data.table |
If TRUE, return a data.table (possibly faster). |
tolower |
If TRUE, lowercase new indicator names (FALSE by default). |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.