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
Inherited S4 methods
2 messages · cstrato, Seth Falcon
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