[R] Thoughts for faster indexing
bbolker at gmail.com
Thu Nov 21 19:59:13 CET 2013
Neal Fultz <nfultz <at> gmail.com> writes:
> If N is # of rows, k is # of unique IDs
> Using which() is O(N), using which() in a loop is going to be O(Nk);
> sorting the entire data is O(N ln N) and then you can process it in
> contiguous blocks, no which required.
You might also take a look at the 'dplyr' package on Github: it's
next-gen plyr, engineered for performance ...
More information about the R-help