Change values in multiple columns of a dataframe using a lookup table
问题 I am trying to change the value of a number of columns at once using a lookup table. They all use the same lookup table. I know how to do this for just one column -- I'd just use a merge , but am having trouble with multiple columns. Below is an example dataframe and an example lookup table. My actual data is much larger (~10K columns with 8 rows). example <- data.frame(a = seq(1,5), b = seq(5,1), c=c(1,4,3,2,5)) lookup <- data.frame(number = seq(1,5), letter = LETTERS[seq(1,5)]) Ideally, I