[R] Re: S4 method inheritance

From: Ross Boylan <ross_at_biostat.ucsf.edu>
Date: Tue 24 May 2005 - 10:03:45 EST

On Mon, 2005-05-23 at 14:41 -0700, Ross Boylan wrote: ....

> Finally, I'm a bit concerned that one article mentioned that S4
> inheritance, in practice, is used mostly for data, not methods (Thomas
> Lumley, R News 4(1), June 2004: p. 36). Am I going down a road I
> shouldn't travel?
>
Hmm, maybe I just found out. If B is an S4 subclass of A (aka extends A), how does B's method foo invoke A's foo?

The question assumes that A's foo was defined as an in place function, so there's no (obvious) named object for it, i.e, setMethod("A", signature(blah="numeric"), function(x) something)



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 Tue May 24 10:08:51 2005

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