
We are moving to a main branch and release tag model. Local repo clones need to be updated. See the github pop-up or the instructions here.
General Engine for Eco-Evolutionary Simulations 2
This is the repository for the R-package of the gen3sis engine gen3sis2 git.
gen3sis is a spatially-explicit eco-evolutionary mechanistic model with a modular implementation. It allows exploring the consequences of abiotic and biotic (ecological and macroevolutionary) processes across realistic or theoretical spatio-temporal spaces.
gen3sis2 is licensed under a GPLv3 License deriving from ETHZ 2020 <doi.org/10.5905/ethz-1007-251> and has package authorship according to: http://epub.wu.ac.at/3269/1/Report114.pdf
How to cite
- Publication coming soon! For now: O Hagen, B Flueck, F Fopp, JS Cabral, F Hartig, M Pontarp, TF Rangel, L Pellissier (2021) gen3sis: A general engine for eco-evolutionary simulations of the processes that shape Earth’s biodiversity. PLOS Biology. doi:10.1371/journal.pbio.3001340
How to install
you can install the latest development release from GitHub via
devtools::install_github(repo = "gen3sis2/gen3sis2_R-package", dependencies = TRUE, build_vignettes = TRUE)
Below the status of the automatic CI R-CMD-check tests for the main branches:
How to use
Run one simulation
Load and run a simulation with the desired config and spaces. Example data is provided with the package.
library("gen3sis2")
spaces <- system.file(file.path("extdata", "TestSpaces","geostatic_spaces","raster"), package="gen3sis2")
config_file <- system.file(file.path("extdata", "TestConfigs","TestConfig.R"), package="gen3sis2")
sim <- run_simulation(
config = config_file,
space = spaces,
output_directory = tempdir(),
verbose = 0
)
A summary statistics is stored at ‘sim’ more data can be save using the observer function
Check installed version
Make sure you have the latest gen3sis version
#print package version
paste("gen3sis2 version:", packageVersion("gen3sis2"))
How to contribute
Great that you are considering contributing! We welcome contributions from the community, whether they are bug fixes, new features, documentation improvements, or anything else that can help improve the package. Feel free to also reach out over e-mail to discuss ideas. For guidelines on contributing to this project, please refer to the CONTRIBUTING.md file. In short, we use a simplified trunk based model with a main branch:
- main – reflects the current head of development, and releases on CRAN are tagged here. Complete features are merged onto the main branch by PR or from feature branches
- feature_branches – New and partial developments happen on separate feature branches, which will be merged into main after passing a review and testing.
Credits
We thank the developers of the following methods and dependencies:
Rcpp Dirk Eddelbuettel and James Joseph Balamuta (2018). Extending R with C++: A Brief Introduction to Rcpp. The American Statistician. 72(1). URL https://doi.org/10.1080/00031305.2017.1375990
BH Dirk Eddelbuettel, John W. Emerson and Michael J. Kane (2021). BH: Boost C++ Header Files. R package. https://CRAN.R-project.org/package=BH
Matrix Bates D, Maechler M, Jagan M (2025). Matrix: Sparse and Dense Matrix Classes and Methods. R package. https://CRAN.R-project.org/package=Matrix
tidyterra Hernangómez D. (2023). Using the tidyverse with terra objects: the tidyterra package. https://doi.org/10.21105/joss.05751
terra Hijmans R, Brown A, Barbosa M (2026). terra: Spatial Data Analysis https://cran.r-project.org/web/packages/terra/index.html
h3jsr O’Brien L. (2023). h3jsr: Access Uber’s H3 Library. https://CRAN.R-project.org/package=h3jsr
sf Pebesma E. (2018). Simple Features for R: Standardized Support for Spatial Vector Data. https://r-spatial.github.io/sf/
igraph Csárdi G., Nepusz T. (2006). The igraph software package for complex network research. https://igraph.org>
sp Roger S. Bivand, Edzer Pebesma, Virgilio Gomez-Rubio, 2013. Applied spatial data analysis with R, Second edition. Springer, NY. https://asdar-book.org/
stringr Wickham H (2025). stringr: Simple, Consistent Wrappers for Common String Operations. https://CRAN.R-project.org/package=stringr
ggplot2 Wickham H. (2016). https://ggplot2.tidyverse.org
scales Wickham H., Pedersen T., Seidel D. (2025). scales: Scale Functions for Visualization. https://CRAN.R-project.org/package=scales
patchwork Pedersen T. (2025). patchwork: The Composer of Plots. https://CRAN.R-project.org/package=patchwork
testthat Wickham H. (2011). testthat: Get Started with Testing. The R Journal, vol. 3, no. 1, pp. 5–10, https://doi.org/10.32614/RJ-2011-002
formatR Yihui Xie (2021). formatR: Format R Code Automatically. R package. https://CRAN.R-project.org/package=formatR
scico Crameri, F. (2018). Scientific colour maps. Zenodo. http://doi.org/10.5281/zenodo.1243862 & Crameri, F., G.E. Shephard, and P.J. Heron (2020). The misuse of colour in science communication, Nature Communications, 11, 5444. doi:10.1038/s41467-020-19160-7
Contributors
All contributions to this project are gratefully acknowledged using the allcontributors package following the allcontributors specification. Contributions of any kind are welcome!
|
ohagen |
AdmirJr |
bouwerutger |
LewisAJones |
benj919 |
|
bethany-j-allen |
florianhartig |
loic-pellissier |
yihui |
FFopp |
|
mmore500 |
ZHG2017 |
cakloecker |
cndesantana |
castroinsua |
|
adamkocsis |
dromaeo |