R-alpha: NextMethod problem

Thomas Lumley (thomas@biostat.washington.edu)
Thu, 12 Sep 1996 12:36:07 -0700 (PDT)

Date: Thu, 12 Sep 1996 12:36:07 -0700 (PDT)
From: Thomas Lumley <thomas@biostat.washington.edu>
To: R-testers <r-testers@stat.math.ethz.ch>
Subject: R-alpha: NextMethod problem
In-Reply-To: <Pine.SUN.3.91.960912112718.13098D-100000@chekov>

Me again. 

NextMethod appears to have problems with class names that contain a "."

In the survival4 library there is a class "coxph.null".  The residuals 
method for this class, residuals.coxph.null, calls NextMethod to pass the 
object to residuals.coxph

In the NextMethod call, the previous call (residuals.coxph.null) should be
decomposed into a generic part ("residuals") and a class ("coxph.null").  It 
actually gets broken into 3 pieces, "residuals", "coxph" and "null".  The 
function then looks for "null" in the class list of the object, doesn't 
find it, and crashes. 

One solution, of course, is to change the class name to "coxphnull".

thomas lumley
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch