[R] Add rank column to data frame as in SQL...

Gabor Grothendieck ggrothendieck at gmail.com
Sat Jun 2 13:17:16 CEST 2012


On Fri, Jun 1, 2012 at 11:23 AM, Brigid Mooney <bkmooney at gmail.com> wrote:
> Hopefully this is an easy problem...
>
> I'm trying to add a partitioned rank column to a data frame where the
> rank is calculated separately across a partition by categories, the
> way you could easily do in SQL.  I found this solution in the archives
> that looked like it might work:
> and provide commented, minimal, self-contained, reproducible code.

See the sqldf home page (http://sqldf.googlecode.com) and in
particular this part:

https://code.google.com/p/sqldf/#12._How_does_one_use_sqldf_with_PostgreSQL?


-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com



More information about the R-help mailing list