Split Composite Names

strsplit2(x, split, colnames = NULL, ...)

Arguments

x

character vector

split

character to split each element of vector on, see strsplit

colnames

colnames for the result

...

other arguments are passed to strsplit

Value

data.frame

Examples

strsplit2(c("a;b", "c;d"), ";", colnames = c("col1", "col2"))
#>   col1 col2
#> 1    a    b
#> 2    c    d