onehot_vec: One hot encode a vector

View source: R/QC_clean.R

onehot_vecR 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


eHDPrep documentation built on Sept. 9, 2025, 5:56 p.m.