Hi Jim, Thank you for your answers.
I also don't know where does the error like you mentioned come from. But for me, R works normally with the codes following: require(psych) 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(28,keys.list,item.labels=colnames(bfi)) scores = score.items(keys,bfi,min=1,max=6) error.bars.by(scores$scores,round(bfi$age/10)*10,by.var=TRUE,main="BFI age trends",legend=3,labels=colnames(scores$scores),xlab="Age",ylab="Mean item score") I have retried and it is running Except when i want to change the plotting character and line type of the graph by the code below: error.bars.by(scores$scores,round(bfi$age/10)*10,by.var=TRUE,main="BFI age trends",legend=3,labels=colnames(scores$scores),xlab="Age",ylab="Mean item score",pch=c(1,2,3,4), lty=1) i get the error. Tham. -- View this message in context: http://r.789695.n4.nabble.com/plot-in-package-psych-with-function-error-bars-by-tp4691632p4691694.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.