Separate columns
separate_var(data, var, by, names, into = c("cols", "rows"))Separated dataset
dataset
name of variable to be separated
a string as delimiter between values (separate by delimiter) or
integer(s) as number of characters to split by (separate by position),
the length of by should be 1 unless by is integer
and into = "cols"; if by is a non-integer numeric vector
its values will be rounded down to the nearest integer
for into = "cols", a character vector of output column
names; use NA if there are components that you don't want to
appear in the output; the number of non-NA elements determines
the number of new columns in the result
whether to split into new rows or columns
Zhaoming Su