Skip to content
Prev 39589 / 63424 Next

two minor bugs in rowsum()

Hi,
On 03/29/2011 01:24 AM, Prof Brian Ripley wrote:
[...]
Another problem with the current naming is the inconsistent use of
the row/col prefixes, IMO:

 > x <- matrix(runif(100), ncol=5)
 > rowsum(x, rep(1, 20))
       [,1]     [,2]    [,3]     [,4]     [,5]
1 11.13374 10.50038 10.0258 11.04087 8.150401
 > colSums(x)
[1] 11.133738 10.500381 10.025805 11.040867  8.150401

and the fact that the See Also section points to rowSums and not
colSums, which adds to the confusion...

Cheers,
H.