Message-ID: <200504191630.j3JGUL3v010271@erdos.math.unb.ca>
Date: 2005-04-19T16:30:21Z
From: Rolf Turner
Subject: Ranking within a classification variable.
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()''.
cheers,
Rolf