Hi guys, I need your help.
I have a variable with text as answers and I´d like recode it into a new variable with a number for every answer.
The text answers are like "Strongly disagree", "Disagree" and so on.
I tried this command:
data$variable.r<-recode(data$variable, "'strongly disagree=0; 'disagree'=1; 'agree'=2; 'strongly agree'=3")
But it doesn´t work.
Is there a command in R to recode text to numbers?
Thanks very much!