I have a character vector like this:
id <-c("A01A01", "A01B01", "A01C01", "R", "S", "T")
I need to cut a prefix from all the strings that contains it, keeping all the substrings My expected output are then 2 other vectors like these:
a <-c("A01", "A01", "A01", "", "", "")
b <-c("A01", "B01", "C01", "R", "S", "T")