[R] Doing SQL GROUP BY in R

pallier pallier at lscp.ehess.fr
Sat Apr 3 20:02:05 CEST 2004


JFRI (Jesper Frickmann) wrote:

>I want a list of the number of times some factor levels appear together,
>  
>

Say a and b are the names of the factors:

table(a,b)

table(a:b)

aggregate(a,list(a=a,b=b),length)

Christophe Pallier
http://www.pallier.org




More information about the R-help mailing list