# NOT RUN {
#Tne following shows how to create a dictionary
#first, copy the spreadsheet to the clipboard
# bfi.dictionary <- read.clipboard.tab() #read from the clipboard
# rownames(bfi.dictionary) <- bfi.dictionary[1] #the first column had the names
# bfi.dictionary <- bfi.dictionary[-1] #these are redundant, drop them
f5 <- fa(psychTools::bfi,5)
m <- colMeans(psychTools::bfi,na.rm=TRUE)
item.lookup(f5,m,dictionary=psychTools::bfi.dictionary[2])
#just show the item content, not the source of the items
fa.lookup(f5,dictionary=psychTools::bfi.dictionary[2])
bfi.keys <-
list(agree=c("-A1","A2","A3","A4","A5"),conscientiousness=c("C1","C2","C3","-C4","-C5"),
extraversion=c("-E1","-E2","E3","E4","E5"),neuroticism=c("N1","N2","N3","N4","N5"),
openness = c("O1","-O2","O3","O4","-O5"))
lookupFromKeys(bfi.keys,psychTools::bfi.dictionary,n=5)
#show the keying information
# }
Run the code above in your browser using DataLab