dt_set_one_hot | R Documentation |
Convert data.table's factor to one-hot encoding in-place
dt_set_one_hot(x, xname = NULL, verbosity = 1L)
x |
data.table. |
xname |
Character, optional: Dataset name. |
verbosity |
Integer: Verbosity level. |
The input, invisibly, after it has been modified in-place.
EDG
## Not run:
ir <- data.table::as.data.table(iris)
# dt_set_one_hot operates in-place; therefore no assignment is used:
dt_set_one_hot(ir)
ir
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.