[Rd] Inherited S4 methods

Seth Falcon sfalcon at fhcrc.org
Fri Mar 16 17:40:09 CET 2007


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
http://bioconductor.org



More information about the R-devel mailing list