onehot_vec {eHDPrep}R Documentation

One hot encode a vector

Description

Uses one-hot encoding to convert nominal vectors to a tibble containing variables for each of the unique values in input vector.

Usage

onehot_vec(x, prefix)

Arguments

x

non-numeric vector

prefix

prefix to append to output variable names

Value

tibble


[Package eHDPrep version 1.3.3 Index]