[R] tables

John Kane jrkrideau at yahoo.ca
Mon Jun 21 21:12:31 CEST 2010


?prop.table probably.

RSiteSearch at R Site Search  http://finzi.psych.upenn.edu/nmz.html

or ?RSiteSearch would probably given you the anwser in about 30 seconds.

--- On Mon, 6/21/10, Erin Hodgess <erinm.hodgess at gmail.com> wrote:

> From: Erin Hodgess <erinm.hodgess at gmail.com>
> Subject: [R]  tables
> To: "R help" <r-help at stat.math.ethz.ch>
> Received: Monday, June 21, 2010, 2:46 PM
> Dear R People:
> 
> I have generated the following table:
> 
> > table(zza$DEATH,zza$GENDER)
> 
>            
>    F   M
>   2009-04-21   0   1
>   2009-04-22   4   2
>   2009-04-24   6   0
>   2009-04-25   1   3
>   2009-04-26   2   0
>   2009-04-28   3   0
>   2009-04-29   2   2
> 
> However, instead of total counts in the F and M columns, I
> would like percents.
> 
> How would I do this, please?
> 
> thanks,
> Erin
> 
> 
> 
> -- 
> Erin Hodgess
> Associate Professor
> Department of Computer and Mathematical Sciences
> University of Houston - Downtown
> mailto: erinm.hodgess at gmail.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.
> 





More information about the R-help mailing list