That all worked, thank you! Last question - again, it is bizarre because it worked yesterday, same code, same data, but my code to switch values isn't working either
#Recode each ETest item as 4 and 3=0, 2=1, 1=2
for(ETest_item in ETest_items_vector){
data[ETest_item] = recode(data[,ETest_item], "4=0; 3=0; 2=1; 1=2;")
}
the message i'm now getting is:
Error in recode(data[, ETest_item], "4=0; 3=0; 2=1; 1=2;") :
could not find function "recode"