fastrank-package: Ranking vectors with low overhead

Description Details References

Description

An R package providing fast ranking for integer and numeric vectors, as an alternative to calling .Internal(rank(...)), which packages cannot do.

Details

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

References

https://github.com/douglasgscofield/fastrank


douglasgscofield/fastrank documentation built on May 15, 2019, 10:43 a.m.