catto_onehot: One-hot encoding

View source: R/dummy-onehot.R

catto_onehotR Documentation

One-hot encoding

Description

One-hot encoding

Usage

catto_onehot(train, ..., test, verbose = TRUE)

Arguments

train

The training data, in a data.frame or tibble.

...

The columns to be encoded. If none are specified, then all character and factor columns are encoded.

test

The test data, in a data.frame or tibble.

verbose

Should informative messages be printed? Defaults to TRUE (not yet used).

Value

The encoded dataset in a cattonum_df if no test dataset was provided, and the encoded datasets in a cattonum_df2 otherwise.

Examples

catto_onehot(iris)

bfgray3/cattonum documentation built on Nov. 6, 2022, 11:33 a.m.