data(attitude)
key.list <- list(all=c(1,2,3,4,-5,6,7),
first=c(1,2,3),
last=c(4,5,6,7))
keys <- make.keys(7,key.list,item.labels = colnames(attitude))
keys
scores <- score.items(keys,attitude,short=TRUE)
scores
data(bfi)
keys.list <- list(agree=c(-1,2:5),conscientious=c(6:8,-9,-10),extraversion=c(-11,-12,13:15),neuroticism=c(16:20),openness = c(21,-22,23,24,-25))
keys <- make.keys(25,keys.list,item.labels=colnames(bfi))
scores <- score.items(keys,bfi,short=TRUE)
scores
Run the code above in your browser using DataLab