In R I have a data.frame and I'd like to do a bulk update.
My table looks like
Col1 Col2 Col3
A 123 456
A 789 012
B 345 678
B 789 012
I want to scan over the table and replace A
with "Apple"
and B
with "Banana"
In my case, the list of replacements is quite long (~30 items) so I have them both in lists like:
old<-c('A','B')
new<-c('Apple','Banana')