Learn R Programming

lares (version 4.7)

one_hot_encoding_commas: One Hot Encoding for a Vector with Comma Separated Values

Description

This function lets the user do one hot encoding on a variable with comma separated values

Usage

one_hot_encoding_commas(df, variables, sep = ",")

Arguments

df

Dataframe. May contain one or more columns with comma separated values which will be separated as one hot encoding

variables

Character. Which variables should split into new columns?

sep

Character. Which character separates the elements?

See Also

Other Data Wrangling: balance_data, calibrate, categ_reducer, cleanText, date_feats, dateformat, formatNum, formatTime, holidays, impute, left, normalize, numericalonly, ohse, rbind_full, removenacols, removenarows, replaceall, right, textFeats, textTokenizer, vector2text, year_month, year_week