# NOT RUN {
# Cap the population at carrying capacity with only the second and third
# life stage used in calculations to determine density dependence.
# }
# NOT RUN {
cap_population <- ceiling_density(stages = c(2, 3))
ls <- landscape(population = egk_pop, suitability = egk_hab, carrying_capacity = egk_k)
pd <- population_dynamics(change = growth(egk_mat), density_dependence = cap_population)
simulation(landscape = ls, population_dynamics = pd, habitat_dynamics = NULL, timesteps = 20)
# }
Run the code above in your browser using DataLab