split_mult {eye} | R Documentation |
Reveal helper. cuts column into multiple in reveal
split_mult(x, col, pattern = "_", into = NULL, prefix = "var", sep = "")
x |
data frame |
col |
character |
pattern |
regex by which to split |
into |
names of columns - character vector of length of n splits |
prefix |
if into not specified, names created "prefix(sep)index" |
sep |
separator of prefix and index |
modified from this thread on stackoverflow