From maechler at stat.math.ethz.ch  Thu Jan 25 17:48:32 2007
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Thu, 25 Jan 2007 17:48:32 +0100
Subject: [Rd] ?mean
In-Reply-To: <971536df0701250653y47f06f84h9cc24a297250e144@mail.gmail.com>
References: <971536df0701250653y47f06f84h9cc24a297250e144@mail.gmail.com>
Message-ID: <17848.57184.404781.602759@stat.math.ethz.ch>

>>>>> "Gabor" == Gabor Grothendieck <ggrothendieck at gmail.com>
>>>>>     on Thu, 25 Jan 2007 09:53:49 -0500 writes:

    Gabor> The help page for mean does not say what happens when one
    Gabor> applies mean to a matrix.

    Gabor> mean and sd work in an inconsistent way on a matrix
    Gabor> so that should at least be documented.

You are right (though I think this *was* documented at some
point in time).

As a matter of fact, I hate the the inconsistencies you've
been mentioning, and I think is very wrong from an S-pedagogical
point of view.... both 
that    sd(mat)  :<==> apply(mat, 2, sd)
and   mean(dfr)  :<==> apply(dfr, 2, mean)
  
and it leads just to wrong ``analogy conclusions'' by useRs.

I'd vote for deprecating these ``builtin conveniences''
in order to gain consistency and clarity...

Though I haven't checked how many CRAN + Bioconductor packages
would break if we'd disactivate these two mis-features ...

Martin

    Gabor> Also there should be a See Also to colMeans since that
    Gabor> provides the missing column-wise analog to sd.



[Rd] ?mean
Martin Maechler