From brahm at alum.mit.edu  Wed Oct 22 00:25:50 2003
From: brahm at alum.mit.edu (David Brahm)
Date: Wed Oct 22 00:24:50 2003
Subject: [Rd] Subsetted 1-D arrays (PR#4110)
Message-ID: <16277.45678.55489.229526@arbres1a.fmr.com>

In R-patched_2003-10-20, subsetted 1-D arrays no longer get converted to
vectors.  The NEWS file documents this change, as an indirect result of bug
report 4110.  I just wanted to mention this can break code in some rather
obscure ways, such as this toy example:

  R> x <- sort(tapply(1:8, rep(1:4,2), sum))  # Was vector, now is 1D array
  R> y <- matrix(1:4, 1,4)                    # 1x4 matrix
  R> x + y                                    # Used to return a 1x4 matrix
     Error in x + y : non-conformable arrays

I agree with the change, but I would beware that some puzzled users may not
associate new "tapply problems" with this news item.

Also, *should* you be able to add a (4) array to a (1,4) array?
-- 
                              -- David Brahm (brahm@alum.mit.edu)


[Rd] Subsetted 1-D arrays (PR#4110)
David Brahm