From spencer.graves at pdf.com  Sun Jul  6 18:47:37 2008
From: spencer.graves at pdf.com (Spencer Graves)
Date: Sun, 06 Jul 2008 09:47:37 -0700
Subject: [Rd] Comparing dimensions in arrays?
Message-ID: <4870F729.9070303@pdf.com>

      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



[Rd] Comparing dimensions in arrays?
Spencer Graves