setClass("B", representation=representation("B",
extra="numeric))
setClass("B",
representation=representation(extra="numeric"),
contains="B")
Are these the same? If not, how do they differ?
What about
setClass("B", representation=representation("B",
extra="numeric"),
contains="B")
?
As far as I can tell, the Green Book doesn't talk about a contains
argument to setClass.
--
Ross Boylan wk: (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4 ross at biostat.ucsf.edu
Dept of Epidemiology and Biostatistics fax: (415) 476-9856
University of California, San Francisco
San Francisco, CA 94143-0840 hm: (415) 550-1062
On Thu, 18 Aug 2005, Ross Boylan wrote:> setClass("B", representation=representation("B", extra="numeric)) > setClass("B", representation=representation(extra="numeric"), > contains="B") > Are these the same? If not, how do they differ? > > What about > setClass("B", representation=representation("B", extra="numeric"), > contains="B") > ? > > As far as I can tell, the Green Book doesn't talk about a contains > argument to setClass."S4 - Composition and Inheritance" by Witold Eryk Wolski (a.k.a. Extending.pdf) might be what you're looking for. ---------------------------------------------------------- SIGSIG -- signature too long (core dumped)
Oops, the second class should have been A in the examples. Corrected
version:
setClass("B", representation=representation("A",
extra="numeric))
setClass("B",
representation=representation(extra="numeric"),
contains="A")
Are these the same? If not, how do they differ?
What about
setClass("B", representation=representation("A",
extra="numeric"),
contains="A")
?
As far as I can tell, the Green Book doesn't talk about a contains
argument to setClass.
--
Ross Boylan wk: (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4 ross at biostat.ucsf.edu
Dept of Epidemiology and Biostatistics fax: (415) 476-9856
University of California, San Francisco
San Francisco, CA 94143-0840 hm: (415) 550-1062