[R] "Conditional" average

Christopher W. Ryan cryan at binghamton.edu
Wed Apr 25 03:35:45 CEST 2012


Kebrab67--

It's difficult to answer in the absence of a small bit of representative 
data, and more information about it. How is age76 recorded, as numerical 
years or in categories (age ranges?)  And what are years (you didn't 
mention them as a variable in your data.)

That being said, perhaps by(), or summaryBy() in the doBy package, might 
help.

--Chris Ryan
SUNY Upstate Medical University Clincal Campus
Binghamton, NY

kebrab67 wrote:
> Hello, I have a set of data including age, wage and education level each
> called age76, wage76 and grade76 I want to know how i can calculate the
> average wage of people age 15 to 65 (each year separetly) , only for those
> who have an education level of 10 12 and 16...
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Conditional-average-tp4585313p4585313.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.



More information about the R-help mailing list