search for: reversed_list

Displaying 1 result from an estimated 1 matches for "reversed_list".

Did you mean: reverse_list
2008 May 19
2
recoding data with loops
...<- data.frame(cbind(varlist[1:length(var_list)]) mdf # Then, I'd like to recode the variables that begin with the letter "H". # I've tried many variations of the following, but to no avail: reverse_list <- c("HEQUAL", "HREVDIS1", "HREVDIS2") reversed_list <- c("RHEQUAL", "RHREVDIS1", "RHREVDIS2") for(i in 1:length(reverse_list)) {mdf[ ,e_reversed_list][[i]] <- recode(mdf[ ,e_reverse_list][[i]], '5:99=NA; 1=4; 2=3; 3=2; 4=1; ', as.factor.result=FALSE) # I'm sure I have many deep misunderstandings abou...