[R] devide data into decile

Uwe Ligges ligges at statistik.uni-dortmund.de
Tue May 9 09:13:22 CEST 2006


Guojun Zhu wrote:

> I guess this is really basic.  But I do not find an
> answer yet.  I have a big data.frame.  I would like to
> divede them into 10 deciles accounding to one of its
> member.  Then I need a number for each decile with
> some computaion within each group.  How to devide it?

For example, the result of cut() as a new variable to the data.frame and 
afterwards split() the data.frame by the resulting factor.

Uwe Ligges




> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list