Re: [R] S4 : defining [- using inheritance from 2 classes

2011-11-21 Thread cgenolin
My working example is in the package kml3d. The class 'clusterLongData' is define by inehirance from class 'listClustering' and 'longitudinalData'. But as you say, it is unusual, I will try an other way. Thank you for your help. Christophe -- View this message in context:

Re: [R] S4 : defining [- using inheritance from 2 classes

2011-11-18 Thread Martin Morgan
On 11/17/2011 09:46 PM, cgenolin wrote: Hi the list, I define a class 'C' that inherit from two classes 'A' and 'B'. 'A' and 'B' have no slot with similar names. setClass( Class=C, contains=c(A,B) ) To define the get operator '[' for class C, I simply use the get of

[R] S4 : defining [- using inheritance from 2 classes

2011-11-17 Thread cgenolin
Hi the list, I define a class 'C' that inherit from two classes 'A' and 'B'. 'A' and 'B' have no slot with similar names. setClass( Class=C, contains=c(A,B) ) To define the get operator '[' for class C, I simply use the get of A or B (the constante 'SLOT_OF_A' is a