[R] Query about using table

From: lalitha viswanath <lalithaviswanath_at_yahoo.com>
Date: Thu 26 Oct 2006 - 18:53:25 GMT

I have data of the following form
ID age member_FLAG
1 25 Y

2    36.75   N 
3    75.5    N


I want to get a histogram of this data showing distribution of member_flag in each age-bin i.e. how many values in each age bin have a member_flag of 'Y' and how many have 'N'.
I was able to do the same using barplot2.

However I also need similar information in a tabular form using percentages.
i.e in each age bin, what is the PERCENTAGE of IDs with a member_flag of 'Y'

I am trying to work with table for the same, but would appreciate some guidance regarding the above.


R-help@stat.math.ethz.ch 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. Received on Fri Oct 27 12:39:30 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 27 Oct 2006 - 03:30:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.