jeudi 30 avril 2020

Assign value in one column if character in other column is x in R

I am trying to assign a specific interger/number in a column if the character in another column is x. I have 5 characters which repeat down the column, and in a new column I need to assign a number to each repeating character. Basically each of the 5 characters has a specific number that needs to go in the new column. Please help!

Aucun commentaire:

Enregistrer un commentaire