[R] trouble calculating rates--sometimes the denominator is missing
Christopher W. Ryan
cryan at binghamton.edu
Wed Mar 10 16:44:52 CET 2010
One more bit: I got as far as this, thinking it might help:
Using a data file that I know has all the necessary denominators, I
created a dataframe of school names (as factor) and TotalStudentsEnrolled.
data.frame(data$School[!duplicated(data$School)],
data$TotalStudentsEnrolled[!duplicated(data$School)])
1 BENJAMIN FRANKLIN ES 465
2 CALVIN COOLIDGE SCHL 379
3 EAST MS 590
4 HORACE MANN SCHL 374
5 MAC ARTHUR SCHL 481
6 THEO ROOSEVELT SCHL 377
[truncated]
I thought I might be able to "look up" the necessary value for each
school from this dataframe. But I can't get my head around using indices
to do it.
Thanks again.
--Chris
--
Christopher W. Ryan, MD
SUNY Upstate Medical University Clinical Campus at Binghamton
425 Robinson Street, Binghamton, NY 13904
cryanatbinghamtondotedu
"If you want to build a ship, don't drum up the men to gather wood,
divide the work and give orders. Instead, teach them to yearn for the
vast and endless sea." [Antoine de St. Exupery]
More information about the R-help
mailing list