dt_set_one_hot: Convert data.table's factor to one-hot encoding _*in-place*_

View source: R/preprocess.R

dt_set_one_hotR Documentation

Convert data.table's factor to one-hot encoding in-place

Description

Convert data.table's factor to one-hot encoding in-place

Usage

dt_set_one_hot(x, xname = NULL, verbosity = 1L)

Arguments

x

data.table: Input data.table. Will be modified in-place.

xname

Character, optional: Dataset name.

verbosity

Integer: Verbosity level.

Value

The input, invisibly, after it has been modified in-place.

Author(s)

EDG

Examples

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

rtemis documentation built on Oct. 20, 2026, 1:06 a.m.