R code for simulating species range shifts and calculating the strength of coexistence between competitors. This code was used to produce the results and figures in:
Usinowicz, J., and J. M. Levine. 2018. Species persistence under climate change: a geographical scale coexistence problem. Ecology Letters 21:1589–1603.