Split string on first two colons
- by Mark Miller
I would like to split a column of strings on the first two colons, but not on any subsequent colons:
my.data <- read.table(text='
my.string some.data
12:34:56:78 -100
87:65:43:21 -200
a4:b6:c8888 -300
11:bb:ccccc -400
uu:vv:ww:xx -500', header = TRUE)
desired.result <- read.table(text='
my.string1 my.string2 my.string3…