ohe.df | R Documentation |
One-hot encodes all categorical variables in a data.frame
ohe.df(df, drop_ref = TRUE)
df |
A data.frame that can contain columns of any variable type. |
drop_ref |
Logical, default = |
A data.frame of all columns of class factor returned as one-hot encoded. All other column types are returned untouched.
df <- data.frame(lets = rep(letters[1:3], 3), LETS = rep(LETTERS[1:3], 3), x = rnorm(9))
ohe.df(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.