[R] How to use tapply with more than one variables grouped
petr.pikal at precheza.cz
Mon Oct 22 11:00:38 CEST 2012
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of noobmin
> Sent: Monday, October 22, 2012 2:28 AM
> To: r-help at r-project.org
> Subject: [R] How to use tapply with more than one variables grouped
> I'm studying alone the R language for data preparation. I found a
> course at MIT for data preparation that uses python but I'm using R to
> learning. The first exercise is the preparation of data from a database
> that shows the contributions made to candidates for U.S. president. The
> database is described in FORMART
> link. I wonder how to print the table showing how many states are
> President Obama the top candidate (by full amount of donations
> received) with R language?
> I try using tapply method but, i dont understand how to working with
> more than one variable grouped. Could anyone help me in advance of the
How did you use tapply? Did you read help page? It points to ?aggregate which is maybe what you are looking for.
> View this message in context: http://r.789695.n4.nabble.com/How-to-use-
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help