[R] another question about lmer, this time involving coef()

Peter Dalgaard p.dalgaard at biostat.ku.dk
Tue Jan 10 17:24:25 CET 2006


Andrew Gelman <gelman at stat.columbia.edu> writes:

> Error in "rownames<-"(x, value) : attempt to set rownames on object with 
> no dimensions
....
> Am I doing something stupid here or is it actually a (minor) bug?

The latter. There's a drop=FALSE missing in the coef() method,
specifically in the line

   val <- lapply(ref, function(x) fef[rep(1, nrow(x)), ])

which should read

   val <- lapply(ref, function(x) fef[rep(1, nrow(x)), , drop=FALSE])


-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




More information about the R-help mailing list