#################### Description of code and simulations #################### Two .rar archives are included. 'code' contains the R code required to replicate the simulations, analyse the realisations, and create the figures as represented in the main text. 'sims' contains the simulation model output generated by the different models. ### NOTE: The 'sims'archive is not required to re-create the figures as represented in the main text as analysis output is provided in the 'code'archive ### ---sims ├───IS (Invader-superiority realisations) │ ├───A_peripatry (realisations resulting from the peripatric speciation model) │ ├───B_vicariance (realisations resulting from the vicariant speciation model) │ ├───C_unbounded (realisations resulting from the peripatric speciation model w/ unbounded niche space) │ ├───D_global_dispersal (realisations resulting from the peripatric speciation model w/ global dispersal) │ ├───E_invasion (realisations resulting from the post hoc invasion experiment) │ ├───F_large_start_range (realisations resulting from the peripatric speciation model w/ a large ancestral start range) │ └───G_vary_competition_intensity (realisations resulting from the peripatric speciation model where respectively the psi and sigma parameter are varried) │ ├───vary_psi │ └───vary_sigma ├───RS (Resident-superiority realisations) │ ├───A_peripatry │ ├───B_vicariance │ ├───C_unbounded │ ├───D_global_dispersal │ ├───E_invasion │ ├───F_large_start_range │ └───G_vary_competition_intensity │ ├───vary_psi │ └───vary_sigma └───SC (Symmetric competition realisations) ├───A_peripatry ├───B_vicariance ├───C_unbounded ├───D_global_dispersal ├───E_invasion ├───F_large_start_range └───G_vary_competition_intensity ├───vary_psi └───vary_sigma --- code │ 0_stepup_script.R (script with the required packages) │ 1_analyse_realisations.R (script for analysis to create Figure 2 and Figure S4) │ 2_analyse_realisation_fig_4_5.R (script for analysis to create Figure 4, 5 and S5) │ 3_analyse_realisations_Jac_Pairwise_S4_S6.R (computes the temporal turnover in community composition; script for analysis required for Figure S4 and S6) │ Figure_2.R (plot Figure 2) │ Figure_3.R │ Figure_4.R │ Figure_5.R │ Figure_6.R │ Figure_S1.R │ Figure_S2.R │ Figure_S3.R │ Figure_S4.R │ Figure_S5.R │ Figure_S6.R │ ├───1_results (1_analyse_realisations.R results) │ rates_bounded.csv │ rates_bounded.RData │ ├───2_results (2_analyse_realisation_fig_4_5.R results) │ primary_mu_0_0.csv │ primary_mu_0_0005.csv │ primary_mu_0_00125.csv │ primary_mu_0_0025.csv │ primary_mu_0_005.csv │ primary_mu_0_0075.csv │ primary_mu_0_0125.csv │ T360_vicariance_mu_0_0.005.csv │ T360_vicariance_mu_0_0.0125.csv │ T360_vicariance_mu_0_0.025.csv │ T360_vicariance_mu_0_0.05.csv │ T360_vicariance_mu_0_0.075.csv │ T360_vicariance_mu_0_0.125.csv │ T360_vicariance_mu_0_0.csv │ ├───3_input (input for Figure_3.R) │ IS_simulation401_series_A_lambda_0.5_gamma_0.25_psi_0.25_alpha_1_sigma_0.25_mu_0_0_mu_max_5.RData │ RS_simulation401_series_A_lambda_0.5_gamma_0.25_psi_0.25_alpha_1_sigma_0.25_mu_0_0_mu_max_5.RData │ ├───6_input (output of the invasion-experiment used for creating Figure 6) │ ├───IS │ ├───RS │ └───SC │ ├───figures (Figures created by the R-scripts) │ Figure2.pdf │ Figure_3.pdf │ Figure_4.pdf │ Figure_5.pdf │ Figure_6.pdf │ Figure_6_legend_extract.pdf │ Figure_S1.pdf │ Figure_S2.pdf │ Figure_S3.pdf │ Figure_S4.pdf │ Figure_S5.pdf │ Figure_S6.pdf │ ├───run_invasion_model (scripts required to replicate the invasion-experiment) │ │ 1_call_script_invaders.R │ │ invasibility_functions.R (functions for the IS and RS model) │ │ invasibility_functions_symmetric.R (functions for the SC model) │ │ │ └───sims (input realisations used for the invasion-experiment) │ ├───IS │ ├───RS │ └───SC │ ├───run_model (scripts required to run the main model) │ 1_call_script.R │ functions_incumbency_sample_rates.R (functions for the IS and RS model) │ functions_incumbency_sample_rates_global_dispersal.R (functions for the IS and RS model w/ global dispersal) │ functions_incumbency_sample_rates_symmetric.R (functions for the SC model) │ functions_incumbency_sample_rates_symmetric_global_dispersal.R (functions for the SC model w/ global dispersal) │ functions_incumbency_vicariance_sample_rates.R (functions for the IS and RS model w/ vicariant speciation) │ functions_incumbency_vicariance_sample_rates_symmetric.R (functions for the SC model w/ vicariant speciation) │ IS_functions.cpp (supporting Rcpp functions for the IS model, and can also be used for SC) │ RS_functions.cpp (supporting Rcpp functions for the RS model, and can also be used for SC) │ ├───S1_results │ GLOB_rich_bal.csv │ LS_rich_bal.csv │ PRIM_rich_bal.csv │ UNB_rich_bal.csv │ VIC_rich_bal.csv │ ├───S2_results │ summary_T360_psi_025_var_sigma.csv │ T360_psi_025_var_sigma.csv │ ├───S3_results │ T360_sigma_025_var_psi.csv │ ├───S4_results │ jac_pairwise_bounded.csv │ ├───S6_results │ Jaccard_metric_unbounded.csv │ rates_unbounded.csv │ └───support_functions (supporting functions required for the analysis or plotting) functions_code_paleophylo.R