>>>>> "DavidB" == David Brahm <[EMAIL PROTECTED]>
>>>>>     on Mon, 30 Jan 2006 18:39:05 +0100 (CET) writes:

    DavidB> Wasn't there once a time when tapply(f,f,sum) (with "f" a vector)
    DavidB> returned a vector instead of a 1D array?  Then colnames(x) would 
just
    DavidB> give NULL instead of an error.  Sorry my memory isn't more precise.

well, it was very good...

R-0.16  had this 
R-0.63.3 (March 3, 1999)  already didn't anymore, i.e. it
already did return a 1D-array.

So, indeed Karl must have used a *very* old version of R.
Martin Maechler, ETH Zurich

    DavidB> -- David Brahm ([EMAIL PROTECTED])=20


    DavidB> -----Original Message-----
    DavidB> From: [EMAIL PROTECTED]
    DavidB> [mailto:[EMAIL PROTECTED] On Behalf Of Prof Brian Ripley
    DavidB> Sent: Monday, January 30, 2006 3:45 AM
    DavidB> To: [EMAIL PROTECTED]
    DavidB> Cc: [EMAIL PROTECTED]; r-devel@stat.math.ethz.ch
    DavidB> Subject: Re: [Rd] colnames(tapply(...)) (PR#8539)


    DavidB> On Mon, 30 Jan 2006 [EMAIL PROTECTED] wrote:

    >> I would like to bring to your attention the following error message
    >> which didn't appear on previous versions (long time ago?)
    >> 
    >> Thanks for all your effort
    >> 
    >> Karl
    >> 
    >> Version 2.2.1 Patched (2006-01-21 r37153)
    >> 
    >> > f <- rep(c(1,2),each=3D5)
    >> > x <- tapply(f,f,sum)
    >> > colnames(x)
    >> Error in dn[[2]] : subscript out of bounds

    DavidB> What is inappropriate about this?  x is a 1D array, so it does not 
have
    DavidB> column names (or columns).  Indeed, the help page says

    DavidB> x: a matrix-like R object, with at least two dimensions for
    DavidB> 'colnames'.

    DavidB> The exact same message appears in 1.6.2, more than three years old 
(and=20
    DavidB> the earliest version I still have running). If earlier versions did 
not=20
    DavidB> have an error message, that was probably a bug.

    DavidB> --=20
    DavidB> Brian D. Ripley,                  [EMAIL PROTECTED]
    DavidB> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
    DavidB> University of Oxford,             Tel:  +44 1865 272861 (self)
    DavidB> 1 South Parks Road,                     +44 1865 272866 (PA)
    DavidB> Oxford OX1 3TG, UK                Fax:  +44 1865 272595

    DavidB> ______________________________________________
    DavidB> R-devel@r-project.org mailing list
    DavidB> https://stat.ethz.ch/mailman/listinfo/r-devel

    DavidB> ______________________________________________
    DavidB> R-devel@r-project.org mailing list
    DavidB> https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to