one_hot | R Documentation |
One-hot encode a factor variable
one_hot(labels)
labels |
|
integer
Integer vector of encoded labels.
## Not run:
one_hot(factor(c("a", "b", "a")))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.