Dear R-devel,

If we have two classes that have the same representation but with slightly
different constraints, say something like:


setClass("foo", representation=c(a="numeric", b="data.frame"))
setClass("bar", contains="foo",
         validity=function(object) if (length([EMAIL PROTECTED]) < 2) {
         return("b must be longer than 1")
         })


I would like to be able to interpret foo as bar, if foo satisfies the
validity argument.  I think this requires a call to setIs(), but I'm not
sure what the best way to do this is, considering the necessary setAs()
calls.  I would appreciate some suggestions as to how to make the setAs()
and setIs() calls in cases like this.  Thanks in advance.


Cheers,

-- 
Seb

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to