Mutate a (factor, character, integer, etc) column into multiple columns,
Source:R/utils.R
col_to_binaries.Rd
Easily mutate a single column into multiple columns (~dummies+1), while retaining variable labels and order of the original factor variable.
Arguments
- data
Data frame or tibble.
- col
Single column. Tidy-select.
- var_separator
Variable separator
scalar<character>
// default:NULL
(optional
)Separator between old variable name and categories.
- label_separator
scalar<character>
// default:NULL
(optional
)Separator between old label name and new label part.