df <- data.frame(sid = c("S1", "S2"),
it1 = c("A", "B"), it2 = c("AC", "A"))
key <- data.frame(item = c("it1", "it2"), key = c("A", "AC"),
type = c("single", "multiple"))
as.data.frame(dcc_score(df, key))
Run the code above in your browser using DataLab