Re: [Rd] inherits() and virtual classes

2007-06-27 Thread Prof Brian Ripley
inherits() is not to do with S4 classes: it tests inheritance in the base class system. See ?is in package 'methods'. > is(jj, "onion") [1] TRUE On Wed, 27 Jun 2007, Robin Hankin wrote: > Hi > > How do I test for an object having a particular virtual class? > > In the following, "onion" is a

[Rd] inherits() and virtual classes

2007-06-27 Thread Robin Hankin
Hi How do I test for an object having a particular virtual class? In the following, "onion" is a virtual class, and "octonion" is a non-virtual class contained in onion. The last call to inherits() gives FALSE [R-2.5.0], when inherits.Rd led me to expect TRUE. setClass("onion", rep