[R] plot in package psych with function error.bars.by

William Revelle lists at revelle.net
Thu Jun 19 15:48:46 CEST 2014


Dear Tham,

The example you were running was filtering out the subjects less than 10 years old and more than 80.  Somehow you suppressed this filtering which lead to the error message.  The filtering was done to avoid the problem you detected.

I have fixed error.bars.by so that it now will just complain if there is only one case (and thus no error) in a cell.  In this case, it will not draw the “cats eye” error bars.

The Mac version of psych_1.4.6.18 is now on the personalty.project.org/r   server  repository.  The PC version  is at personality-project/r/src/contrib/  as a zip file:  psych_1.4.6.18.zip

For a Mac, just set your other repository to personalty.project.org/r and install the source version.  For a PC you need to ftp or http to personality-project/r/src/contrib/ to get the zip file.

Once again, when you discover a problem with the psych package, make sure to write me directly as well as the list.  You will get much faster turnaround.

Bill

On Jun 16, 2014, at 2:52 AM, Tham Tran <hanhtham.tran at yahoo.com.vn> wrote:

> Hi William,
> 
> I've just updated your latest package "psych_1.4.6.11.zip" from server
> "personality-project/r/src/contrib/". One time the updating process was
> finished, i tried to run based samples code:
> 
> 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 = scoreItems(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")
> 
> then i had an error following: 
> 
> Erreur dans if (del == 0 && to == 0) return(to) : 
>  valeur manquante là où TRUE / FALSE est requis
> De plus : Messages d'avis :
> 1: In qt(1 - alpha/2, group.stats[[g]]$n - 1) : production de NaN
> 2: In dt(ln, n - 1) : production de NaN
> 3: In qt(alpha/2, n - 1) : production de NaN
> 
> Could you tell me how to fix these issues? May i had a mistake of updating
> your lasted package?
> 
> Sincerly
> Tham
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/plot-in-package-psych-with-function-error-bars-by-tp4691632p4692177.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at 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.

William Revelle		           http://personality-project.org/revelle.html
Professor			           http://personality-project.org
Department of Psychology   http://www.wcas.northwestern.edu/psych/
Northwestern University	   http://www.northwestern.edu/
Use R for psychology             http://personality-project.org/r
It is 5 minutes to midnight	   http://www.thebulletin.org



More information about the R-help mailing list