All,

I am considering creating an S4 class whose slots (2) are both S4 classes.  
Since an S4 slot can be an S3 class I figure this can be done.  However, the 
correct syntax of which I am unsure.  Reviewing the docs I have come to the 
following conclusion:

SetClass('myfoo',
                  slots = (foo1, foo2))

Without a type I believe each slot is .Data.  A get method on the above class 
slots would return say foo1 which will have all methods and generics belonging 
to foo1 class.  Is this the correct approach?

Best,
Glenn
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to