uniq -c
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