onehot: One Hot Encoding of vector

Description Usage Arguments Value Examples

View source: R/unsorted.R

Description

One Hot Encoding of vector

Usage

1
onehot(x)

Arguments

x

vector with D possible categorical values (will be coerced to factor)

Value

matrix with D columns and same number of columns as length of x

Examples

1
onehot(1:5)

jsilve24/driver documentation built on Jan. 30, 2022, 12:07 p.m.