[R] Error in variable ' _' converted to a factor AND *tmp*

Jhope jeanwaijang at gmail.com
Wed Jan 18 08:56:40 CET 2012


 I am wondering if anyone can tell me what the error I'm receiving means
below. I thought it said that Aeventexhumed should be converted to a factor,
so I tried to do so and received the following error. 

Please advise. J
---------------------------------------------------------

> data.to.analyze.glm <- glm(cbind(MaxHatch, TotalEggs-MaxHatch) ~
> Aeventexhumed, family=binomial, data=data.to.analyze)
Warning message:
In model.matrix.default(mt, mf, contrasts) :
  variable 'Aeventexhumed' converted to a factor

> data.to.analyze$Aevent ~ as.factor(data.to.analyze$Aevent)
data.to.analyze$Aevent ~ as.factor(data.to.analyze$Aevent)

> data.to.analyze$Aeventexhumed <- as.factor(data.to.analyze$Aevent)
Error in `$<-.data.frame`(`*tmp*`, "Aeventexhumed", value = integer(0)) : 
  replacement has 0 rows, data has 127

> summary(data.to.analyze$Aeventexhumed)
   Length     Class      Mode 
      127 character character 

--
View this message in context: http://r.789695.n4.nabble.com/Error-in-variable-converted-to-a-factor-AND-tmp-tp4305951p4305951.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list