billy_no_mates
2010-Feb-03 23:55 UTC
[R] Creating a table with median for multiple variables
I need to create a table using median "votes" by "party" I have a large dataset with 7 different parties and 464 different vote numbers. Any suggestions? -- View this message in context: http://n4.nabble.com/Creating-a-table-with-median-for-multiple-variables-tp1461994p1461994.html Sent from the R help mailing list archive at Nabble.com.
Peter Alspach
2010-Feb-04 05:03 UTC
[R] Creating a table with median for multiple variables
?tapply ?aggregate should get you started .... Peter Alspach> -----Original Message----- > From: r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] On Behalf Of billy_no_mates > Sent: Thursday, 4 February 2010 12:55 p.m. > To: r-help at r-project.org > Subject: [R] Creating a table with median for multiple variables > > > I need to create a table using median "votes" by "party" > > I have a large dataset with 7 different parties and 464 > different vote numbers. > > Any suggestions? > -- > View this message in context: > http://n4.nabble.com/Creating-a-table-with-median-for-multiple > -variables-tp1461994p1461994.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. >
On 02/04/2010 10:55 AM, billy_no_mates wrote:> > I need to create a table using median "votes" by "party" > > I have a large dataset with 7 different parties and 464 different vote > numbers. > > Any suggestions?Hi billy_no_mates, It's a bit hard to work out what you want with just the above. Are the votes from the electoral districts for the different parties, or from the parties for different pieces of legislation? If the former, you would have seven values that represent the median number of votes for each party and so on. Jim