s4 - usage of setOldClass in R -
i have created union class
setclassunion("numericornull",members=c("numeric", "null"))
getclass("numericornull")
then need use new class in slot of object. @ moment build package error. have found can use setoldclass:
setoldclass("numericornull")
however, affecting definition of class:
getclass("numericornull")
and code doesn't work anymore
invalid object slot "myslot" in class "myclass": got class "numeric", should or extend class "numericornull"
any idea?
Comments
Post a Comment