Create effect-coded columns, supporting tidyselect syntax to process multiple columns simultaneously.
Usage
effect_coding(data, cols, factor = FALSE)
Value
An object of the same type as .data. The output has the following properties:
1. Columns from .data will be preserved.
2. Columns that are effect-coded.
Arguments
data
A data.frame or a data.frame extension (e.g. a tibble).
cols
Columns that need to be effect-coded. See `dplyr::dplyr_tidy_select` for available options.
factor
The default is `FALSE`. If factor is set to `TRUE`, this function returns a tibble with effect-coded factors. If factor is set to `FALSE`, this function returns a tibble with effect-coded columns.