Is there a way to recode multiple variables at once?
问题 I have a dataset of students' report card marks that range from D- to A+. I'd like to recode them into scale of 1-12 (i.e. D- = 1, D = 2 ... A = 11, A+ = 12). Right now I'm suing the revalue function in plyr . I have several columns that I'd like to recode - is there a shorter way to do this than running revalue on each column? Some data: student <- c("StudentA","StudentB","StudentC","StudentD","StudentE","StudentF","StudentG","StudentH","StudentI","StudentJ") read <- c("A", "A+", "B", "B-",