# NOT RUN {
df <- data.frame(id = c(1:5),
x = c("AA, D", "AA,B", "B, D", "A,D,B", NA),
z = c("AA+BB+AA", "AA", "BB, AA", NA, "BB+AA"))
ohe_commas(df, "x")
ohe_commas(df, c("x", "z"), sep = "\\+|,")
# }
Run the code above in your browser using DataLab