View source: R/effect_coding.R
effect_coding | R Documentation |
Create effect-coded columns, supporting tidyselect syntax to process multiple columns simultaneously.
effect_coding(data, cols, factor = FALSE)
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. |
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.
effect_coding(iris,Species)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.