Description Usage Arguments Examples
Take a set of one hot encoded columns (values: 0 or 1) and transform them back into a single factor column.
1 2 | fuse_one_hot(vars, out = ".out", missing = "missing", as.integer = FALSE,
keep = FALSE)
|
vars |
Function or formula that returns selected columns from a data.frame. Alternatively, character vector of column names. |
out |
Name of the new column |
missing |
Value to use for the rows where all the one hot columns are zero. |
as.integer |
Whether the output should be integer (or character). |
keep |
Should the original one hot encoded column be kept |
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.