I'm looking for a way to have R:
-
check for a certain value in a column A
-
and if it finds it, then look at the corresponding value in a column B in a corresponding row
-
and change the corresponding value in a column C based on this.
I.e. something like
data$C[if(data$A==X) AND if(data$B==Y)] = 1
I will try to illustrate it on an example.
Item Response Category
A 10
B 5
"If the Item is A and the Response is below 7, enter 1 into Category"
Thanks a lot!
Aucun commentaire:
Enregistrer un commentaire