onehot | R Documentation |
One hot encoding of data.frames
onehot(dataset, all = FALSE, df = FALSE)
dataset |
Dataset to endcode |
all |
Extract all factor levels (e.g., for tree-based models) |
df |
Return a data.frame (tibble) |
head(onehot(diamonds, df = TRUE))
head(onehot(diamonds, all = TRUE, df = TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.