[R] Two ways to inherit in S4?

Ross Boylan ross at biostat.ucsf.edu
Wed Jun 8 02:22:17 CEST 2005


I'm puzzled that it seems possible to specify inheritance via the
"representation" and "contains" arguments to setClass.  The examples
that I've seen all seem to use contains only.

Is there some subtle distinction between these two approaches?
Originally I thought one had to repeat the same information in both
places, but that seems not to be the case.

Sorry about all these questions.
Ross




More information about the R-help mailing list