Hi, I have a large matrix of data with column names like this:
ABCD-123A-1234-AB1AB1
I would like to short these to
ABCD-123A
Unfortunately the second part (123A) is 4 or 5 characters so I can't cut it by length?
Is there a way to use gsub to sub everything from the second - for ""? Or another solution?