I have a string which I want to split up and replace the last 2 numbers with characters. So for example a string of "1-1-2-2" would become "1-1-B-B". I have included a snippet of what I'm trying to do and my attempt so far and hopefully it becomes a bit clearer.
> df
num
1-1-26-2
1-2-2-4
1-2-4-5
1-3-25-1
So now I have attempted to split up the old_num column using strsplit(num, '-')
but unsure of how to replace the last 2 digits with the characters using the replacement df from below
> replacement_df
character num
A 1
B 2
D 4
E 5
Y 25
Z 26