I have three diferent strings that match and overlap along the caracteres
a = 'ABCDEF'
b = 'DEFGHI'
c = 'FGHIJK'
How can I combine these strings to have this output?
match
[1] 'ABCDEFGHIJK'
I have three diferent strings that match and overlap along the caracteres
a = 'ABCDEF'
b = 'DEFGHI'
c = 'FGHIJK'
How can I combine these strings to have this output?
match
[1] 'ABCDEFGHIJK'
One option could be:
paste(Reduce(union, sapply(list(a, b, c), strsplit, "")), collapse = "")
[1] "ABCDEFGHIJK"