[R] uniq -c

Duncan Murdoch murdoch.duncan at gmail.com
Tue Oct 16 20:22:51 CEST 2012


On 16/10/2012 1:46 PM, Sam Steingold wrote:
> > * Duncan Murdoch <zheqbpu.qhapna at tznvy.pbz> [2012-10-16 12:47:36 -0400]:
> >
> > On 16/10/2012 12:29 PM, Sam Steingold wrote:
> >> x is sorted.
> > sparseby(data=x, INDICES=x, FUN=nrow)
>
> this takes forever; apparently, it does not use the fact that x is
> sorted (even then - it should not take more than a few minutes)...
>

It was more or less instantaneous on the examples you posted.  It would 
be a bit more honest to say "it was fast on the examples, but it was 
very slow when I ran it on my real data, which consists of 
100000000000000 cases."

Duncan Murdoch




More information about the R-help mailing list