[Rd] Unexpected behaviour of x[i] when i is a matrix, on Windows

Seth Falcon seth at userprimary.net
Fri Feb 12 19:21:09 CET 2010


On 2/12/10 10:12 AM, Peter Ehlers wrote:
> You're comparing 2.10.0 on Windows with 2.11.0 on Linux.
> Have you tried 2.11.0 on Windows? => same result as on Linux.

Indeed, this is new functionality added to R-devel (5 Jan).  Indexing an 
n-dim array with an n-column matrix used to only be supported when the 
matrix contained integers.  Character matrices are now supported to map 
to dimnames of the array.  Here's the NEWS entry:

     o   n-dimensional arrays with dimension names can now be indexed
         by an n-column character matrix. The indices are matched
         against the dimension names.  NA indices are propagated to the
         result.  Unmatched values and "" are not allowed and result in
         an error.

Cheers,

+ seth

-- 
Seth Falcon | @sfalcon | http://userprimary.net/user



More information about the R-devel mailing list