[R] Error message glmer using R: “ 'what' must be a character string or a function”

Ben Bolker bbolker at gmail.com
Wed Nov 6 20:25:53 CET 2013


William Dunlap <wdunlap <at> tibco.com> writes:

 
> > You can reproduce the problem by having a data.frame (or anything
> > else) in your environment: > > I left out "called 'new'" in the
> > above statement.  The example is correct.
 
> Bill Dunlap
> Spotfire, TIBCO Software
> wdunlap tibco.com
> 
> > -----Original Message-----

[snip]

> > You can reproduce the problem by having a data.frame (or anything
> > else) in your environment: new <- data.frame(ï..VAR00001 =
> > rep(c(TRUE,NA,FALSE), c(10,2,8)), random=rep(1:3,len=20),
> > clustno=rep(c(1:5),len=20), validatedRS6=rep(0:1,len=20)) model1<-
> > glmer(validatedRS6 ~ random + (1|clustno), data=new,
> > family=binomial(), nAGQ=3) # Error in do.call(new, c(list(Class =
> > "glmResp", family = family), ll[setdiff(names(ll), : # 'what' must
> > be a character string or a function The problem is in the call
> > do.call(new, list()) It finds your dataset 'new' (in .GlobalEnv),
> > which is not a function or the name of a function, not the
> > function 'new' from the 'methods' package.  Rename your dataset,
> > so you do not have anything called 'new' masking the one in
> > package:methods, and things should work.  Write to the maintainer
> > of the package (use maintainer("lme4") for the address) about the
> > problem.

For what it's worth, I saw this on StackOverflow:

[broken URL]
http://stackoverflow.com/questions/19801070/
  error-message-glmer-using-r-what-must-be-a-character-string-or-a-function

answered it there, and have fixed it on Github: 

https://github.com/lme4/lme4/commit/9c12f002821f9567d5454e2ce3b78076dabffb54

While it is not officially forbidden in 
http://www.r-project.org/posting-guide.html (to my surprise, I can't
even find any proscription against cross-posting to R mailing lists,
although there is a section about "which list to post to"), posting
to both r-help and Stack Overflow tends to lead to duplicated effort/
frustration.  Please choose one or the other (in my opinion it's
OK to cross-post after a few days if you don't get any responses
in one place, provided that you say that you've cross-posted and
ideally provide a reference link to the cross-post).

  Ben Bolker



More information about the R-help mailing list