Comparing dimensions in arrays?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Comparing dimensions in arrays?

Spencer Graves
      What functions exist to compare dimensions of arrays, other than
the obvious checks of 'dim' and 'dimnames'?

      I ask, because I'm about to write something like this for the
'fda' package, and I'd prefer to use something that is already available.

      Specifically, I'm thinking of the following:

           checkDim(x, y, xdim=1, ydim=1, defaultNames, subset=c('xiny',
'yinx', 'either', 'neither'), ndimsMismatch = c('xiny', 'yinx',
'either', 'neither') )

      This would return list(xout, yout) where dimension 'xdim' of
'xout' would match dimension 'ydim' of 'yout', and both would have
identical dimnames.  If defaultNames = FALSE, it would throw an error if
the  corresponding dimnames of 'x' and 'y' did not match.

      Comments?
      Thanks,
      Spencer Graves

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel