[R] update don't find an object
David Winsemius
dwinsemius at comcast.net
Thu Feb 21 15:42:27 CET 2008
Ronaldo Reis Junior <chrysopa at gmail.com> wrote in
news:200802210736.15414.chrysopa at gmail.com:
> I try this update:
>
> mmaa <- update(mma,biomass~qvartemp)
That does not look like it has proper arguments to update.formula. As
the update() help page suggests:
?update.formula
You should have included the call that created "mma". Assuming that
"mma" is a model object, and the dependent variable in that model was
"biomass", then perhaps:
mmaa <- update(mma, ~ . + qvartemp) # ... is what you wanted?
On the other hand, I do not see "biomass" in your list of objects below,
so who knows? If these guesses are wrong, then re-read the posting guide
and provide more detail.
>
> but I have this message:
>
> Error in eval(expr, envir, enclos) : object "qvartemp" not found
>
> but this object exist:
>
> [1] "cont" "i" "levelsord" "mma" "qvar"
> "qvarmma" [7] "qvartemp" "test" "yvar"
>
> but if I use the glm directly it work:
>
> mmaa <- glm(biomass~qvartemp)
I guess "biomass" must exist <somewhere>. More guessing: Is it in one of
those other objects that you attach()ed before the call to glm()?
<snipped summary output>
> Anybody have any idea about this problem in update?
I doubt that it is a problem in update.
--
David Winsemius
More information about the R-help
mailing list