From otoomet at gmail.com  Mon Sep 19 18:05:13 2016
From: otoomet at gmail.com (Ott Toomet)
Date: Mon, 19 Sep 2016 09:05:13 -0700
Subject: [Rd] row names of 'rowsum()'
In-Reply-To: <1A8C1289955EF649A09086A153E2672403FE677130@GBTEDVPEXCMB04.corp.lgc-group.com>
References: <CAMMJQ0YFrrqFvOa2j3F=Kc3pTJkefQRq-zBT=AcNm9CMJiBT6A@mail.gmail.com>
	<1A8C1289955EF649A09086A153E2672403FE677130@GBTEDVPEXCMB04.corp.lgc-group.com>
Message-ID: <CAMMJQ0YyoPsf3Aa1zdaJ1H-dNsJHgcA6chWWFc=Gtf78sbCRRg@mail.gmail.com>

I am referring to base::rowsum(), not rowSums().  For some reason I cannot
access it's help on my computer but the online documentation (R-devel
version) states:

Value
A matrix or data frame containing the sums. There will be one row per
unique value of group

Period.  Above, the argument 'reorder' is mentioned which orders rows to
'agree with tapply'.

Cheers,
Ott

On Mon, Sep 19, 2016 at 8:41 AM, S Ellison <S.Ellison at lgcgroup.com> wrote:

> > 'rowsum()' seems to add row names to the resulting matrix, corresponding
> to
> > the respective 'group' values.  This is very handy, but it is not
> documented.
> > Should the documentation mention it so it could be relied upon as part
> of API?
>
> If you're referring to base::rowSums, the 'value' section of the help page
> says
> " A numeric or complex array of suitable size, or a vector if the
>   result is one-dimensional.  For the first four functions the
>   'dimnames' (or 'names' for a vector result) are taken from the
>   original array. "
>
> S Ellison
>
>
> *******************************************************************
> This email and any attachments are confidential. Any u...{{dropped:23}}



[Rd] row names of 'rowsum()'
Ott Toomet