[R] Binning or grouping data

alamoboy alamoboy at gmail.com
Thu Jun 4 08:39:18 CEST 2009


Newbie here.  Many apologies in advance for using the incorrect lingo.  I'm
new to statistics and VERY new to R.

I'm attempting to "group" or "bin" data together in order to analyze them as
a combined group rather than as discrete set.  I'll provide a simple example
of the data for illustrative purposes.

Patient ID  |  Charges   |    Age  |   Race
1              |  100          |    0     |   Black
2              |  500          |    3     |   White
3              |  200          |    5     |   Hispanic
4              |   90           |    7     |   Asian
5              |    400        |   10     |   Hispanic 
6              |    500        |   16     |   Black

I'm trying to create three age categories--"0 to 4", "5 to 11" and "12 to
17"--and analyze their "Charges" by their "Race."  How do I go abouts to
doing this?  

Thanks for any assistance!


Sam


-- 
View this message in context: http://www.nabble.com/Binning-or-grouping-data-tp23864555p23864555.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list