Description Details References
An R package providing fast ranking for integer and numeric vectors, as an alternative to calling .Internal(rank(...)), which packages cannot do.
The motivation for this comes from my development of the
nestedRanksTest
package. A standard run with the default 10,000
bootstrap iterations takes a few seconds to complete on a test data set.
Profiling with library(lineprof)
revealed that the bottleneck here is
in the utility function nestedRanksTest_Z
, specifically in the
calculation of ranks via the base R function rank
. A stripped-down
rank_new
is 8-9 times faster than the default rank for a vector of 100
values. For 1000-value vectors the speedup is more modest, about 2×,
and for 10,000-value vectors the speedup is only in the neighbourhood of
20-30
https://github.com/douglasgscofield/fastrank
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.