Re: [Rd] understanding virtual classes and extensions thereof

2006-10-21 Thread Martin Morgan
John Chambers <[EMAIL PROTECTED]> writes: > As for: > > setClass("kid4", contains = "mom") > > this is currently a meaningless class: It's not virtual but it has no > meaningful prototype. My preference would be a change that makes this a > virtual class, as the programmer probably intended (

Re: [Rd] understanding virtual classes and extensions thereof

2006-10-21 Thread Parlamis Franklin
thank you John, as always, for your thoughtful responses. (i've been teaching my children to play chess, which probably isn't that different an experience ;) one further comment and a related (maybe) bug report. comment: setClass("mom") setClass("kid2", contains = c("mom", "VIRTUAL")) wi

Re: [Rd] understanding virtual classes and extensions thereof

2006-10-21 Thread John Chambers
IMO, the recommended version is: setClass("kid2", contains = c("mom", "VIRTUAL")) because it's the clearest, using the representation argument only for defining slots. Better yet, if your virtual classes don't have any slots defined, use setClassUnion() for "mom", with the other classes membe

[Rd] understanding virtual classes and extensions thereof

2006-10-20 Thread Parlamis Franklin
I am having some trouble creating a hierarchy of virtual classes (akin to the class structure in the 'Matrix' package). I think they arise from my not understanding the best way to specify virtual subclasses of a virtual class. please see questions below code. setClass("mom") setClass("ki