[R] Question about manipulating quartiles

From: Ajay Shah <ajayshah_at_mayin.org>
Date: Sat 31 Jul 2004 - 17:13:28 EST

I know the `quantcut' function in the gregmisc package, and using it, I'm able to use functions like aggregate to compute the mean or sd() in each quartile.

What if I have a data frame containing x and y, and I want to make quartiles by x, but then compute sum x / sum y in each quartile? How does one persuade aggregate to do this?


Ajay Shah                                                   Consultant
ajayshah@mayin.org                      Department of Economic Affairs
http://www.mayin.org/ajayshah           Ministry of Finance, New Delhi

R-help@stat.math.ethz.ch mailing list
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Sat Jul 31 17:23:06 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 02:41:29 EST