Re: [R] Incompatibility with VGAM

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Sun 29 May 2005 - 23:21:42 EST

Kjetil Brinchmann Halvorsen wrote:
> I just discovered that when the VGAM package (not on CRAN) is loaded,
> glm() doesn't work. This is because VGAM defines a family function()
> which gets found
> by glm() in place of the family function from stats.
> Then VGAM:::family returns an object which doesn't have a $family
> component, (it has a component
> $vfamily).
>
> I thought namespaces should protect us from this happening?

Yes and no:

Yes: The namespace would protect you if glm would call internally the family function such as poisson().

No: Probably you have asked something like glm(....., family=poisson()). Now the first instance of poisson() in the search path is used. You are passing a call to poisson(), and this is not bound to any namespace. Of course you can specify tha namespace such as glm(....., family=stats::poisson()).

Uwe Ligges

> Kjetil
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sun May 29 23:28:06 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:15 EST