Skip to content
Back to formatted view

Raw Message

Message-ID: <1350996719526-4647122.post@n4.nabble.com>
Date: 2012-10-23T12:51:59Z
From: noobmin
Subject: How to use tapply with more than one variables grouped
In-Reply-To: <1350992511282-4647111.post@n4.nabble.com>

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.