Using novel phylogenetic methods to study the co-evolution of religious and political authority across Austronesia.
To run this code, you will need to install R and the following R packages:
install.packages(c("ape", "bayestestR", "brms", "colorspace",
"cowplot", "future", "future.callr", "geosphere",
"ggrepel", "HDInterval", "phangorn", "phaseR",
"phytools", "readxl", "rstan", "targets",
"tarchetypes", "tidybayes", "tidyverse"))
You will also require the rethinking
package, which you can install with the following code (see here for more details):
# from https://github.com/rmcelreath/rethinking
install.packages(c("coda", "mvtnorm", "devtools", "loo", "dagitty"))
devtools::install_github("rmcelreath/rethinking")
Finally, you will require the ggtree
package, which you can install with the following code (see here for more details):
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("ggtree")
- Set the working directory to this code repository
- Load the
targets
package withlibrary(targets)
- To run all analyses, run
tar_make()
(ortar_make_future(workers = N)
to run the pipeline in parallel on your local machine, with N workers) - To load individual targets into your environment, run
tar_load(targetName)
Any issues, please email scott.claessens@gmail.com.
Scott Claessens, scott.claessens@gmail.com