From brahm@alum.mit.edu  Fri Sep 14 15:46:57 2001
From: brahm@alum.mit.edu (brahm@alum.mit.edu)
Date: Fri, 14 Sep 2001 16:46:57 +0200 (MET DST)
Subject: [Rd] rowsum dimnames (PR#1092)
Message-ID: <200109141446.QAA16930@pubhealth.ku.dk>

The result of rowsum() in R doesn't have the dimnames I'd expect, e.g.:

> rowsum(matrix(1:12, 3,4), c("Y","X","Y"))
    [,1] [,2] [,3] [,4]
  1    2    5    8   11
  2    4   10   16   22

whereas S-Plus gives the more useful result:
    [,1] [,2] [,3] [,4] 
  X    2    5    8   11
  Y    4   10   16   22

This is because R's rowsum() code gives the first dimnames as "ugroup", which
is a factor, rather than "as.character(ugroup)".  Similarly for the assignment
of names(x) in the case where x is a vector.

I'm using R 1.3.0 on Solaris 2.6.  Help says rowsum's author is Terry Therneau.
Thanks!
			-- David Brahm (a215020@agate.fmr.com)

Version:
 platform = sparc-sun-solaris2.6
 arch = sparc
 os = solaris2.6
 system = sparc, solaris2.6
 status = 
 major = 1
 minor = 3.0
 year = 2001
 month = 06
 day = 22
 language = R

Search Path:
 .GlobalEnv, package:misc, package:io, package:arrays, package:ctest, Autoloads, package:base

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] rowsum dimnames (PR#1092)
brahm@alum.mit.edu