[Rd] Inherited S4 methods

Seth Falcon
Fri, 16 Mar 2007 16:40:09 -0000

cstrato <cstrato at aon.at> writes:
> I have a variation of this question:
> Is it possible to use the same function name, e.g. "myfunction"
in both,
> an S4
> baseClass and derivedClass. The method "myfunction" in
derivedCalss should
> extend the functionality defined in baseClass, analogously to C++ methods.
> If this is possible, does there exist an example?

The S4 object system is generic function based.  Methods are not
contained inside classes.

You can define a generic 'myfunction' and then define methods for
BaseClass and DerivedClass.

+ seth

--
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center