Data:
CHROM 1 2 3
ABC 0/1:PASS:123:4214 0/1:PASS:546:4656 0/0:PASS:444:865
DEF 0/1:PASS:123:4214 0/1:PASS:546:4656 0/0:PASS:444:865
GFD 0/1:PASS:123:4214 0/1:PASS:546:4656 0/0:PASS:444:865
Desired output:
CHROM 1 2 3
ABC 0/1 0/1 0/0
DEF 0/1 0/1 0/0
GFD 0/1 0/1 0/0
I have tried:
sub(':*', ''. data)
gsub(':*', ''. data)
But this give me a list as an output rather than a table and I'm not sure what I am doing wrong
Your help would be much appreciated
Many thanks