Re: [R] R annoyances

From: Martin Maechler <>
Date: Fri 20 May 2005 - 19:58:08 EST

>>>>> "TL" == Thomas Lumley <> >>>>> on Thu, 19 May 2005 09:39:13 -0700 (PDT) writes:

    TL> On Thu, 19 May 2005, Rod Montgomery wrote:
>> Thomas Lumley wrote:

    >>> This one is actually a FAQ, mtx[,1,drop=FALSE]
    >>> -thomas

>> I wonder whether there is, or should be, a way to set
>> FALSE as the default?
    TL> There shouldn't be (apart from editing the code),
    TL> because you really don't want something this basic to be
    TL> unpredictable.

    TL> There have been discussions at several times about
    TL> whether drop=FALSE or drop=TRUE should be the
    TL> default. The decision has always been that programmers
    TL> can cope either way, but that users probably don't
    TL> expect mtx[,1] to be a vector, and that they definitely     TL> don't expect mtx[1,1] to be a matrix.

Yes, and (as Uwe has already mentioned), the S language has now been ``defined'' in a few ways for many years, and the decision to make "drop=TRUE" the default (for arrays at least) may have been sub-optimal --- and maybe could have been changed 15 years ago, but not anymore nowadays: It is implicitly made use of in too many places of existing S code.

Those of you who are new to R:
Please don't assume R is new just because you are new to it!

Martin mailing list PLEASE do read the posting guide! Received on Fri May 20 20:01:46 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:56 EST