[R] Newbie question about "grouping"

Thomas Lumley tlumley at u.washington.edu
Wed Jan 28 17:18:15 CET 2009


Some useful commands are:

by(), aggregate(), ave(), split().

eg
   by(market_value, account_id, sum)

         -thomas


On Wed, 28 Jan 2009, Rixon, John C. wrote:

> Hi folks:
>
> I am a SQL guy who just downloaded and installed R yesterday.  I am
> trying to evaluate some "complex" aggregations we are currently
> performing with Syncsort (and have tried in Oracle) with R.  I have
> loaded data in a dataframe and have performed some of the simple
> aggregations on a subset of data.  What I do not see how to do though,
> is to "group" the aggregations on a particular key value (e.g., sum
> market_value over account_id).
>
> If you can point me in the right direction I'd very much appreciate it.
>
> Thanks!
>
> John
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle




More information about the R-help mailing list