[Rd] two minor bugs in rowsum()

Hervé Pagès hpages at fhcrc.org
Tue Mar 29 20:24:27 CEST 2011


Hi,

On 03/29/2011 01:24 AM, Prof Brian Ripley wrote:
> On Fri, 25 Mar 2011, William Dunlap wrote:
[...]
>
>> (The name rowsum is a metabug, since it may be confused
>> with the entirely different rowSums, but it has been around
>> for a long time.)
>
> A lot longer than rowSums ...

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.

>
>> Bill Dunlap
>> Spotfire, TIBCO Software
>> wdunlap tibco.com
>


-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fhcrc.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



More information about the R-devel mailing list