Updated R code on RTR test introduced in Nunes & Pearson, 2017 in Journal of Biogeography. - https://onlinelibrary.wiley.com/doi/full/10.1111/jbi.12910 This RTR analysis uses a spatial randomization approach to measure statistical significance of observed niche overlap between two species.
Nunes, L. A. and Pearson, R. G. (2017), A null biogeographical test for assessing ecological niche evolution. Journal of Biogeography. doi: 10.1111/jbi.12910