On 2011-05-17 02:22, Timothy Bates wrote:
Dear Bryony: the suggestion was not to change the name of the data object, but
to explicitly tell glm.nb what dataset it should look in to find the variables
you mention in the formula.
so the salient difference is:
m1<- glm.nb(Cells ~ Cryogel*Day, data = side)
instead of
attach(side)
m1<- glm.nb(Cells ~ Cryogel*Day)
This works for other functions also, but not uniformly as yet (how I wish it
did and I could say
hist(x, data=side)
Instead of
hist(side$x)
this inconsistency encourages the need for attach()
Only if the user hasn't yet been introduced to the with() function,
which is linked to on the ?attach page.
Note also this sentence from the ?attach page:
".... attach can lead to confusion."
I can't remember the last time I needed attach().
Peter Ehlers
[... non-germane material snipped ...]
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.