R code for carrying capacities from Native turncoats and indirect facilitation of species invasions

R code for algorithm to define a vector of carrying capacities to allow coexistence of native species.