search for: cityrace

Displaying 1 result from an estimated 1 matches for "cityrace".

Did you mean: cityname
2009 Nov 25
1
as.data.frame.table() to convert by() output to a data frame
Dear all, This seems to be working, but I'd like to make sure that I'm not doing anything wrong. I am using by() to construct a complicated summary statistic by several factors in my data (specifically, the 90-50 income ratio by city and race). cityrace.by <- by(microdata, list(microdata$city,microdata$race), function (x) quantile(x$income, probs=0.9) / quantile(x$income, probs=0.5) ) I would now like to use the data created by by() as a dataset with city-race as the unit of observation. However, cityrace.data <- as.data.frame(cityrace.by)...