Re: [R] Definition of generic function for subclasses

2012-03-13 Thread Alexander
The definition of simple in "Keep your class hierarchy simple and relevant to your actual problem" is quite difficult. For someone who has programmed the classes etc, it is quite simple to understand the heritance. But for example for someone else, who has to maintain the code and the classes, it m

Re: [R] Definition of generic function for subclasses

2012-03-13 Thread Martin Morgan
On 03/13/2012 04:34 AM, Alexander wrote: Hi, I am working on a project, which contains S4 classes and subclasses. Lets assume the following organisation: A: S4 Class B,C: inherit from A D,E,F,G: inherit from B H,I: inherit from C I want to define now a generic function, which returns me the name

[R] Definition of generic function for subclasses

2012-03-13 Thread Alexander
Hi, I am working on a project, which contains S4 classes and subclasses. Lets assume the following organisation: A: S4 Class B,C: inherit from A D,E,F,G: inherit from B H,I: inherit from C I want to define now a generic function, which returns me the name of the class. I can now write the function