I'm a SPSS user trying to switch to R.
I have several variables in a data frame (ea01
to ea06
; pre01
to pre09
).
Data comes from a questionnaire and is in likert format (integer from 1 to 5).
SPSS has an option to validate the values of these variables, to check if all of them fall within the expected range, and show in which have invalid errors.
id ea01 ea02 ea03 ea04
1 4 5 6 5
2 3 2 1 3
3 3 2 4 0
4 5 3 4 3
Validation procedure should tell me that case 1 as an invalid value in variable ea03
and case 3 in variable ea04
.
How can this be done in R?