Re: [Rd] S4 inheritance and old class

2015-05-28 Thread Michael Lawrence
On Thu, May 28, 2015 at 2:49 AM, Julien Idé wrote: > Hey everyone, > > I would like to develop a package using S4 classes. > I have to define several S4 classes that inherits from each others as > follow: > > # A <- B <- C <- D > > I also would like to define .DollarNames methods for these class s

Re: [Rd] S4 inheritance and old class

2015-05-28 Thread Gabriel Becker
The problem seems to be with coercion, actually, not validity methods per se: > myd Object of class "D" attr(,"class") [1] "AOldclass" Slot "D": character(0) Slot "C": character(0) Slot "B": character(0) Slot "A": character(0) > as(myd, "B") Object of class "AOldclass" attr(,"class") [1] "AO

Re: [Rd] S4 inheritance and old class

2015-05-28 Thread Martin Morgan
On 05/28/2015 02:49 AM, Julien Idé wrote: Hey everyone, I would like to develop a package using S4 classes. I have to define several S4 classes that inherits from each others as follow: # A <- B <- C <- D I also would like to define .DollarNames methods for these class so, if I have understood