Re: [R] How to use tapply with more than one variables grouped

2012-10-23 Thread noobmin
I meant where obama has higher value compared to other candidates. Looking at the column NY, Obama has the highest. So to state that he wins. Looking for AR column, Michelle wins. I JUST want to list where obama wins. Thank you! This seems to work, just do not understand why you used a threshold?

Re: [R] How to use tapply with more than one variables grouped

2012-10-23 Thread noobmin
Thank you! This seems to work, just do not understand why you used a threshold? I will study your solution, thanks again! -- View this message in context: http://r.789695.n4.nabble.com/How-to-use-tapply-with-more-than-one-variables-grouped-tp4646948p4647199.html Sent from the R help mailing li

Re: [R] How to use tapply with more than one variables grouped

2012-10-23 Thread noobmin
The criteria is to list where Obama has a higher number of contributions. The table shows the number of contribution that each presidential candidate received in a state of the country. The table shown is an example, the query should be generic to a database with hundreds of candidates and dozens

Re: [R] How to use tapply with more than one variables grouped

2012-10-23 Thread noobmin
To take this example I reduced the number of records absurdly. In the original database there are 48 000 candidates and dozens of states. There is no way to analyze data visually. I would not put 400 mb of tables here. But based on the example how could list the states where obama received more con

Re: [R] How to use tapply with more than one variables grouped

2012-10-23 Thread noobmin
I believe that previously could not be understood. To facilitate'll give you an example. Assuming my table is presented below with the amount received from each candidate for president in a particular country state. AL AR CA NY Doug 250 250 250 NA Jennifer 20 340 300 1

Re: [R] How to use tapply with more than one variables grouped

2012-10-22 Thread noobmin
interTable <-data.frame (Tapply ($ contb_receipt_amt date, list ($ cand_nm date, $ contbr_st date), sum)) I got create a table with the sum total contribution (contb_receipt_amt) of each presidential candidate (cand_nm) in each state (contbr_st). How could from interTable create a table of states

[R] How to use tapply with more than one variables grouped

2012-10-21 Thread noobmin
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 descri