powered by
Convert data.table's factor to one-hot encoding in-place
dt_set_one_hot(x, xname = NULL, verbosity = 1L)
The input, invisibly, after it has been modified in-place.
data.table: Input data.table. Will be modified in-place.
Character, optional: Dataset name.
Integer: Verbosity level.
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
Run the code above in your browser using DataLab