Re: [Rd] is() and S3 classes

2008-06-04 Thread Michael Lawrence
On Wed, Jun 4, 2008 at 8:05 PM, Michael Lawrence <[EMAIL PROTECTED]> wrote: > The is() function begins with the following code: > > cl <- class(object) > if (length(cl) > 1) { > if (is.na(match(cl[[1]], names(getClass("oldClass")@subclasses > > return(class2 %in% cl

[Rd] is() and S3 classes

2008-06-04 Thread Michael Lawrence
The is() function begins with the following code: cl <- class(object) if (length(cl) > 1) { if (is.na(match(cl[[1]], names(getClass("oldClass")@subclasses return(class2 %in% cl) As one can see, it uses S3 inheritance if the first element of the class attribute is a