This package provides the implementation of an exact formula of the ith nearest neighbour distance distribution and implementations of tests of independence based on that formula. Furthermore the package provides a general framework to benchmark tests of independence.