Try this: prop.table(table(subset(x, Height > 60, select = Male:Female)))
On Sun, May 2, 2010 at 2:58 PM, Geoffrey Smith <g...@asu.edu> wrote: > Suppose my data looks like this: > > Obs, Male, Female, Height > 1, T, F, 66 > 2, F, T, 64 > 3, T, F, 59 > 4, T, F, 55 > 5, F, T, 62 > 6, T, F, 67 > 7, T, F, 58 > 8, T, F, 57 > 9, F, T, 58 > 10, T, F, 62 > > How can I find the percentage of Males with a Height of over 60? Likewise, > how can I find the percentage of Females with a Height of over 60? > > Thank you very much. > > Geoff > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
______________________________________________ R-help@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.