Skip to content
Prev 41920 / 63421 Next

How to deal with package conflicts

On Fri, 2011-11-25 at 10:42 -0500, Michael Friendly wrote:
The S3 generic idea won't work.  The argument inside ridge(x) is an
ordinary variable, and it's the argument inside that a generic uses for
dispatch.  I want to dispatch based on the context, which is what the
namespace mechanism does for a call to for instance coxpenal.fit, a non
exported survival function.  
  
I suspect that not exporting ridge would work for
	coxph(Surv(time, status) ~ ph.ecog + ridge(age), data=lung)
but not for
      myform <-Surv(time, status) ~ ph.ecog + ridge(age)
      coxph(myform, data=lung)

(I haven't test this)  This is because formulas are treated rather like
functions, with bindings coming into play when they are first defined,
not when they are first used.
I will say that the long list of "reverse depends" on the survival
package does give me pause when making changes.

Terry T.