Skip to main content
Dryad

R code for: The joint evolution of learning and dispersal maintains intraspecific diversity in metapopulations

Data files

Mar 08, 2021 version files 16.23 MB

Abstract

To get a better understanding of the joint evolution of dispersal tendencies and of cognitive abilities, we built an individual-based simulation. Both learning speed and dispersal tendency were free to evolve. Results show that both positive and negative correlations could evolve between these traits, depending on properties both of local patches and of the metapopulation as a whole. Furthermore, we found that dispersal stabilized the co-existence of different cognitive types in the metapopulation, thereby helping to maintain biodiversity within species.

Here we provide the R code for the function with which the simulation for the study "The joint evolution of learning and dispersal maintains intraspecific diversity in metapopulations" has been conducted.

Description of the code is given as comments in the code itself.