[R] glm + error

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Sep 12 12:04:35 CEST 2001


On Wed, 12 Sep 2001, Pesl Thomas wrote:

> Can someone explain this error?
> I do not understand it and do not know what to do.
>
> > v.glm.allmax<-glm(ALL.MAX~.,data=v.q.allmax)
> Error in eval(expr, envir, enclos) : numeric envir arg not of length one

What's v.q.allmax?  My guess is that it is a matrix and not a data frame.
(Perhaps we should explicitly check for that case to give a more
explicit error message.)

The obvious thing to do is to check that what you passed glm is what the
help page says is required.

BTW, since you are using a Gaussian glm, there is little (if any) reason
to prefer glm to lm.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list