Skip to content
Prev 51722 / 63424 Next

unary class union of an S3 class

On Fri, Mar 18, 2016 at 2:53 PM, Herv? Pag?s <hpages at fredhutch.org> wrote:

            
Why not use setIs() for this? Everything then behaves as expected. I don't
think it makes much sense to "contain" a class union. Rather, you just want
to establish the inheritance relationship.
It looks like the unary union somehow equates ArrayLike and array and thus
makes ArrayLike confer a dim attribute (and thus is.array(a) returns TRUE).
Since S4 objects cannot have attributes that are not slots, it must do this
via a data part, thus the .Data slot.