RE: [R] Ranking within a classification variable.

From: Liaw, Andy <andy_liaw_at_merck.com>
Date: Wed 20 Apr 2005 - 02:35:43 EST


> From: Rolf Turner
>
> In response to my question Andy Liaw wrote:
>
> > Here's one way:
>
> <snip>
>
> > > dat$rank <- with(dat, ave(x, f, FUN=rank))
>
> <snip>
>
> > Don't know how this rates on the slick-quick-sexy scale...
>
> Thanks Andy. That's definitely a 10 on the slick-quick-sexy scale.
> I (blush!) didn't know about ``ave()''.

All credits should go to the author of ave(). I didn't know about it either until I saw it on R-help a while ago.

Cheers,
Andy  

> cheers,
>
> Rolf
>
>
>



R-help@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 Received on Wed Apr 20 02:53:10 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:17 EST