Full_Name: Doug Grove Version: 1.7.0 OS: Linux Submission from: (NULL) (209.31.211.56) Hi, Minor mistake in the documentation on the colSums page. In the ARGUMENTS section it states for 'dims' that: For `col*', the sum or mean is over dimensions `dims+1, ...'; for `row*' it is over dimensions `1:dims'. These two are reversed. Thanks, Doug Grove
Documentation of colSums et. al (PR#4154)
4 messages · Douglas Grove, David Brahm, Peter Dalgaard
1 day later
Doug Grove <dgrove@fhcrc.org> wrote:
Minor mistake in the documentation on the colSums page. In the ARGUMENTS section it states for 'dims' that: For `col*', the sum or mean is over dimensions `dims+1, ...'; for `row*' it is over dimensions `1:dims'. These two are reversed.
I think Doug is correct, isn't he? For example, with a 5-dimensional array and dims=3, colSums() sums over the first 3 dimensions (the "rows") and produces a 2-dimensional result. So the sum is over dimensions 1:dims. By the way, S-Plus (6.1.2) documentation is also incorrect; it says "colMeans is a 2 dimensional array consisting of the means across the last 3 dimensions" but it's really across the first 3 dimensions. So why has this bug report ended up in the "trashcan"?
-- David Brahm (brahm@alum.mit.edu)
David Brahm <brahm@alum.mit.edu> writes:
Doug Grove <dgrove@fhcrc.org> wrote:
Minor mistake in the documentation on the colSums page. In the ARGUMENTS section it states for 'dims' that: For `col*', the sum or mean is over dimensions `dims+1, ...'; for `row*' it is over dimensions `1:dims'. These two are reversed.
I think Doug is correct, isn't he? For example, with a 5-dimensional array and dims=3, colSums() sums over the first 3 dimensions (the "rows") and produces a 2-dimensional result. So the sum is over dimensions 1:dims. By the way, S-Plus (6.1.2) documentation is also incorrect; it says "colMeans is a 2 dimensional array consisting of the means across the last 3 dimensions" but it's really across the first 3 dimensions. So why has this bug report ended up in the "trashcan"?
Quite possibly, it got engulfed in spam... Thomas did the move along
with several spam messages, but Brian had already fixed the typo at
that point. The current text reads
dims: Which dimensions are regarded as "rows" or "columns" to sum
over. For 'row*', the sum or mean is over dimensions
'dims+1, ...'; for 'col*' it is over dimensions '1:dims'.
O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
Thanks for fixing this. I was initially confused, but then thought about the two dimensional case (matrix) and realized the doc. was incorrect. Doug
On 15 Sep 2003, Peter Dalgaard BSA wrote:
David Brahm <brahm@alum.mit.edu> writes:
Doug Grove <dgrove@fhcrc.org> wrote:
Minor mistake in the documentation on the colSums page. In the ARGUMENTS section it states for 'dims' that: For `col*', the sum or mean is over dimensions `dims+1, ...'; for `row*' it is over dimensions `1:dims'. These two are reversed.
I think Doug is correct, isn't he? For example, with a 5-dimensional array and dims=3, colSums() sums over the first 3 dimensions (the "rows") and produces a 2-dimensional result. So the sum is over dimensions 1:dims. By the way, S-Plus (6.1.2) documentation is also incorrect; it says "colMeans is a 2 dimensional array consisting of the means across the last 3 dimensions" but it's really across the first 3 dimensions. So why has this bug report ended up in the "trashcan"?
Quite possibly, it got engulfed in spam... Thomas did the move along
with several spam messages, but Brian had already fixed the typo at
that point. The current text reads
dims: Which dimensions are regarded as "rows" or "columns" to sum
over. For 'row*', the sum or mean is over dimensions
'dims+1, ...'; for 'col*' it is over dimensions '1:dims'.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907