splits names and creates a matrix

names_to_matrix(names, split = "\\||\\_")

Arguments

names

vector with names

split

patter to use to split

Value

matrix

Examples

dat = c("bla_ra0/2_run0","bla_ra1/2_run0","bla_ra2/2_run0")
names_to_matrix(dat,split="\\_|\\/")
#>      [,1]  [,2]  [,3] [,4]  
#> [1,] "bla" "ra0" "2"  "run0"
#> [2,] "bla" "ra1" "2"  "run0"
#> [3,] "bla" "ra2" "2"  "run0"