[Rd] Inherited S4 methods
Seth Falcon
sfalcon at fhcrc.org
Fri Mar 16 22:58:10 CET 2007
cstrato <cstrato at aon.at> writes:
> Dear Seth
>
> Thank you, maybe I still do not understand S4 methods.
>
> I thought that the purpose of function "callNextMethod()" is to allow
> some kind of inheritance. In the Bioconuductor packages which are
> using S4, it is only used for method("initialize") but I thought, that
> it can be used with every method "mymethod()", is this correct?
Yes, callNextMethod can be used in any method definition. When you
call a generic function, the system creates a list of all methods for
that generic that are applicable and orders them so that the most
specific method comes first. When you call callNextMethod, you enter
the next most specific method.
+ seth
--
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
http://bioconductor.org
More information about the R-devel
mailing list