Skip to content
Prev 51727 / 63421 Next

unary class union of an S3 class

On 03/19/2016 06:35 AM, Michael Lawrence wrote:
If it was just to indicate this, it would definitely be overkill.
But it's convenient to be able to define methods at the level of
ArrayLike. A typical use case is when a method for a subclass
coerces to "array" and delegates to the method for "array":

     x <- as.array(x)
     callGeneric()

If you don't have the ArrayLike class, you have to define the same
method over and over for each ArrayLike subclass.

It's also useful to be able to use ArrayLike as slots in other
classes.

Anyway, it turns out that I don't need any of these features in
HDF5Array, at least for now.
I'd rather fix what we already have ;-)

H.