New to R - I think there should be a simple solution to this, but I'm having trouble getting it right.
I have results from a questionnaire in the form of 18 variables (each corresponds with a questionnaire item) that I want to score. Results for each variable are either "True", "Sometimes", or "Not true" (all characters). I want to create a loop which changes all 18 variables to numeric scores of 2, 1, and 0, respectively, so I can score the questionnaire.
Could anyone suggest a way of doing this? Thanks!