Skip to content

Inherited S4 methods

2 messages · cstrato, Seth Falcon

#
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?

Best regards
Christian
#
cstrato <cstrato at aon.at> writes:
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