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
-
Neg_Correlation_Run1
187.49 KB
-
Neg_Correlation_Run10
175.61 KB
-
Neg_Correlation_Run2
188.54 KB
-
Neg_Correlation_Run3
188.09 KB
-
Neg_Correlation_Run4
173.86 KB
-
Neg_Correlation_Run5
179.27 KB
-
Neg_Correlation_Run6
188.33 KB
-
Neg_Correlation_Run7
177.12 KB
-
Neg_Correlation_Run8
177.28 KB
-
Neg_Correlation_Run9
175.36 KB
-
NoDispersal_Run1
936.41 KB
-
NoDispersal_Run10
930 KB
-
NoDispersal_Run2
935.93 KB
-
NoDispersal_Run3
934.04 KB
-
NoDispersal_Run4
936.29 KB
-
NoDispersal_Run5
928.56 KB
-
NoDispersal_Run6
935.99 KB
-
NoDispersal_Run7
933.21 KB
-
NoDispersal_Run8
940.74 KB
-
NoDispersal_Run9
937.80 KB
-
PosCorrelation_Run1
376.47 KB
-
PosCorrelation_Run10
378.23 KB
-
PosCorrelation_Run2
375.91 KB
-
PosCorrelation_Run3
375.53 KB
-
PosCorrelation_Run4
376.43 KB
-
PosCorrelation_Run5
378 KB
-
PosCorrelation_Run6
379.46 KB
-
PosCorrelation_Run7
376.38 KB
-
PosCorrelation_Run8
374.32 KB
-
PosCorrelation_Run9
376.70 KB
-
RCode_Dryad.R
36.06 KB
-
Tab_Summary_Competition
1.79 KB
-
Tab_Summary_Frequency_10_10
2.04 KB
-
Tab_Summary_Frequency_14_6
2.03 KB
-
Tab_Summary_Frequency_18_2
2.04 KB
-
Tab_Summary_Frequency_2_18
2.01 KB
-
Tab_Summary_Frequency_20_0
1.86 KB
-
Tab_Summary_Frequency_6_14
2.04 KB
-
Tab_Summary_LearningCost
1.76 KB
-
Tab_Summary_PredatorLethality
1.79 KB
-
WithDispersal_Run1
123.16 KB
-
WithDispersal_Run10
128.88 KB
-
WithDispersal_Run2
123.66 KB
-
WithDispersal_Run3
124.41 KB
-
WithDispersal_Run4
125.04 KB
-
WithDispersal_Run5
123.77 KB
-
WithDispersal_Run6
127.81 KB
-
WithDispersal_Run7
125.34 KB
-
WithDispersal_Run8
124.83 KB
-
WithDispersal_Run9
123.91 KB
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.
Methods
The results are deriving from IMBs. Description of the code is given as comments in the code itself.
Usage notes
Datafiles ending with ~run* are .rds files. Here, for each of the patches within a metapopulation a table is given with one row for each individual. Columns are described in the R code of the simulation which is provided in file: “RCode_Dryad.R”.
Files can be loaded in R using e.g. : data<-readRDS("/Users/jannisliedtke/Desktop/ Neg_Correlation_Run1")
Files named “Tab_Summary_*” are summary tables in .csv format which provided summary statistics (e.g. mean values and std.err. of traits) of metapopulations.
Files can be loaded in R using e.g. : data<-read.csv("/Users/jannisliedtke/Desktop/ Neg_Correlation_Run1")