| 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: Input data.table. Will be modified in-place. |
xname |
Character, optional: Dataset name. |
verbosity |
Integer: Verbosity level. |
The input, invisibly, after it has been modified in-place.
EDG
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.