What happens when horizontal, vertical, oblique transmission interact with sexual biases, population growth and between population mating? This repository allow to run the model used in the paper and redo the plot presented in the paper.
For quick exploration/coding, this repository can be loaded as a package using devtools::load_all()
.
R/
: Core R functions.data/
: R data object used by the packagedata-raw/
: scripts describing how the data have been generatedmanuscript/script_figures/
: scripts to recreate the figuresinst/
:
inst/scripts/
: Various scripts used throughout the development of the model and while writing the paper.inst/extdata/
: Data generated for model exploration.man/
: Documentation for R functions.simulations/
: Simulation outputs (archves in this folder need to be downloaded from Zenodo, see simulations/README.md
).tests/
: Unit tests to ensure that functions generate the expected output.vignettes/
: A few vignettes that explore specific, simple aspects of the model.R/
R/communities.R
: tools to generate and handle communitiesR/computerate.R
: minimal function to compute \code{lambda} give base rate and adaptive traitsR/modelOOstyle.R
: deprecated model base on a list allowing a more Object Oriented feelingR/modelVector.R
: current implementation of the modelR/reproduction.R
: set of functions to handle reproductionR/socialLearning.R
: set of functions to handle social learningR/generatePopulations.R
: create population structureR/socialLearning.R
: core functions defining social learning for all pathways and biasesR/marriage.R
: function dealing with the matching of single individualsR/analysis_tools.R
: function to extract and analysis model outcomeR/ageDeath.R
: function generating age dependent death. R/tools.R
: set of functions used throughout the packageR/legacyFunction.R
: archives of functions not used anymoreR/VecToList.R
: deprecated tools to transform list style model to arraysR/joyplot.R
: functoion to semi automatise the generation of 'joyplot' density plots.inst/scripts/
Various scripts to be cleaned and grouped ; some should be made unit tests, others should be made vignettes
inst/scripts/base_exp_newPW.R
: script to run basic experiment in paralelinst/scripts/paral.R
: last implementation of the script used to run basic experiment in paralelinst/scripts/explore2populations.R
inst/scripts/exploreGrowthRate.R
: draft of script that explore the impact of different parameters on the overall growth of the populationinst/scripts/fullJoyPlot.R
: draft script to generate joyplot representing within pop distribution of $c_i$s (final implementations in R/joyplot)inst/scripts/generateBoxplotsEndTraits.R
: draft script to generate boxplot of % of $c_i$ inst/scripts/generateGraphs.R
inst/scripts/neutralTranmission.R
inst/scripts/retrieveAndPlotGrowthRates.R
inst/scripts/testModel.R
inst/scripts/trajPerTypes.R
inst/extdata/
Small datasets mainly used for unit testing and vignettes:
inst/extdata/commu_ex.RDS
: 4 communities of sizes (154,150,149,150) on a 2x2 gridinst/extdata/pool.ex.Rbin
: fake pool of neutral traits with different sex to test social learning mechanism. 3 pools of 23, 23 and 18 indviduals.inst/extdata/pop_ex.RDS
:populaiton of 602 individual with5 neutral traits population the commu_ex beforeinst/extdata/pop_ex.csv
: csv version of the previous datasetinst/extdata/pop_ex2.csv
: another exemple of a valide popution (N=612)inst/extdata/pop_ex3.csv
: another exemple of a valide popution (N=607)tests/
Test files to be sure everything stays in order (needs to be improved)
This work has been made possible by funding from the Synergy project COREX: From Correlations to Explanations: Towards a New European Prehistory under the European Union’s Horizon 2020 research and innovation programme (Grant Agreement No. 95138) and the ERC Starting Grant Demography, Cultural change, and the Diffusion of Rice and Millet during the Jomon-Yayoi transition in prehistoric Japan (Grant Agreement No. 801953).