"super" class

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

"super" class

Edna Bell
Hi R Gurus

How would a combine several classes into one super class, please

For example, I want to combine ts, zoo, and its into one big overall
class, please.

I've tried several variations on the themes of setOldClass, but no luck.

Thank you for any help.

[hidden email] mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view

Re: "super" class

Is this what you wanted?

setClass("class1", representation(xc1="numeric", xc2="character"))
setClass("class2", representation(cx1="character", cx2="numeric"))
setClassUnion("combinedClass", c("class1","class2"))