I have a list of character vectors:
x_1 <- c("11_m", "11_t", "12_m", "12_t", "13_m", "13_t")
And I wish to modify it in a way that they are grouped into a new vector based on their first two characters, like so:
c(("11_m", "11_t"), ("12_m", "12_t"), ("13_m", "13_t"))