Skip to content
Prev 75857 / 398502 Next

Use of contains in S4 classes

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.