[R] Incompatibility with VGAM

Thomas Lumley tlumley at u.washington.edu
Mon May 30 17:45:29 CEST 2005

On Mon, 30 May 2005, Thomas Yee wrote:

> Hello,
> It seems that if glm used a namespace then the conflict would be avoided?

No.  glm does use a namespace, so this can't be true.  Remember that R 
passes arguments by value, and consider
   glm(y~x, family=poisson())

The namespace ensures that functions called from glm are looked up in the 
stats namespace, but family() not called from glm(). It is called by the 
user and the result is passed as an argument to glm().

The exception is when no family argument is supplied. In that case the 
default argument is created by a call to family() from inside glm(), which 
should always find stats::family


More information about the R-help mailing list