Message-ID: <6E8D8DFDE5FA5D4ABCB8508389D1BF88D5BB06@SRVEXCHMBX.precheza.cz>
Date: 2012-10-23T14:29:03Z
From: PIKAL Petr
Subject: How to use tapply with more than one variables grouped
In-Reply-To: <1350996719526-4647122.post@n4.nabble.com>
Hi
and what is wrong?
Petr
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of noobmin
> Sent: Tuesday, October 23, 2012 2:52 PM
> To: r-help at r-project.org
> Subject: Re: [R] How to use tapply with more than one variables grouped
>
> I used these commands previously:
>
> data <- read.csv("test.csv")
> > tbl=
> >
> data.frame(tapply(data$contb_receipt_amt,list(data$cand_nm,data$contbr_
> st),sum))
> > tbl
> AL AR CA NY
> Doug 250 250 250 NA
> Jennifer 20 340 300 100
> Michele 250 500 250 60
> Obama 15 45 520 600
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/How-to-use-
> tapply-with-more-than-one-variables-grouped-tp4646948p4647122.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.