key2binary
function will convert response pattern data to a dichotomous format, given a response key.key2binary(fulldata, key)
data.frame
, matrix
, or table
with the response patternsfulldata
data(SAT12)
key <- c(1,4,5,2,3,1,2,1,3,1,2,4,2,1,5,3,4,4,1,4,3,3,4,1,3,5,1,3,1,5,4,5)
dicho.SAT12 <- key2binary(SAT12,key)
Run the code above in your browser using DataLab