# Example of a proportion function that disperses no population in the first life stage,
# 50% of the second, and 90% of the 3rd.
if (FALSE) {
prop_dispersal <- set_proportion_dispersing(proportions = c(0, 0.5, 0.9))
kb_dispersal <- kernel_dispersal(dispersal_proportion = prop_dispersal,
max_distance = 2000,
dispersal_kernel = exponential_dispersal_kernel(distance_decay = 1000))
ls <- landscape(population = egk_pop, suitability = egk_hab, carrying_capacity = egk_k)
pd <- population_dynamics(change = growth(egk_mat), dispersal = kb_dispersal)
simulation(landscape = ls, population_dynamics = pd, habitat_dynamics = NULL, timesteps = 20)
}
Run the code above in your browser using DataLab