Skip to content
Prev 63405 / 63424 Next

In glm explicitly search stats for family functions

I believe you can

ex3 <- function() {
  counts <- c(18,17,15,20,10,20,25,13,12)
  outcome <- gl(3,1,9)
  treatment <- gl(3,3)
  stats::glm(counts ~ outcome + treatment, family = stats::poisson)
}

I think if family is character it's searching in parent.frame() rather
than package namespace.


~Michal


On Mon, Mar 9, 2026 at 12:54?PM Tim Taylor
<tim.taylor at hiddenelephants.co.uk> wrote: