Re: [R] group by rows

2016-03-09 Thread Jim Lemon
Hi carol, You could use the "I" function, which will just return what you pass to it. Jim On Thu, Mar 10, 2016 at 12:28 AM, carol white via R-help wrote: > What should be FUN in aggregate as no function like mean, sum etc will be > applied > Carol > > On Wednesday,

Re: [R] group by rows

2016-03-09 Thread Sarah Goslee
On Wed, Mar 9, 2016 at 8:28 AM, carol white wrote: > What should be FUN in aggregate as no function like mean, sum etc will be > applied I have no idea, since you haven't told us what you want the results to look like. > Carol > > > On Wednesday, March 9, 2016 1:59 PM, Sarah

Re: [R] group by rows

2016-03-09 Thread PIKAL Petr
gt; From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of carol > white via R-help > Sent: Wednesday, March 09, 2016 2:28 PM > To: Sarah Goslee > Cc: R-help Help > Subject: Re: [R] group by rows > > What should be FUN in aggregate as no function like

Re: [R] group by rows

2016-03-09 Thread S Ellison
> How is it possible to group rows of a matrix or a data frame by the same > values > of the first column? If you mean _group_ as in SQL GROUP BY, use aggregate() with a count or summary statistic. If you mean _sort_, just to get similar values close together, use order() For example, to

Re: [R] group by rows

2016-03-09 Thread carol white via R-help
What should be FUN in aggregate as no function like mean, sum etc will be applied Carol On Wednesday, March 9, 2016 1:59 PM, Sarah Goslee wrote: Possibly aggregate(), but you posted in HTML so your data were mangled. Please use dput(), post in plain text, and

Re: [R] group by rows

2016-03-09 Thread Sarah Goslee
Possibly aggregate(), but you posted in HTML so your data were mangled. Please use dput(), post in plain text, and try to explain more clearly what you want the result to look like. Sarah On Wed, Mar 9, 2016 at 7:09 AM, carol white via R-help wrote: > How is it possible

[R] group by rows

2016-03-09 Thread carol white via R-help
How is it possible to group rows of a matrix or a data frame by the same values of the first column? 1 14331 453452 653 3762 45 1 1433,453452 45, 653 376 Thanks Carol [[alternative HTML version deleted]] __ R-help@r-project.org mailing list