I would like to ask you the following in R: I have one column: Letter= A, B, C, B, B, A and i want to have a new column, where it looks like this: Letter = A4, B2, C1, B2, B2, A4 . So each time is A, I add the 4, for B the 2 and for C the 1 number in the end.
thank you in advance! Eleni