Skip to main content
mrangr: An R package for mechanistic simulation of metacommunities

mrangr: An R package for mechanistic simulation of metacommunities

This is a Preprint and has not been peer reviewed. This is version 1 of this Preprint.

Add a Comment

You must log in to post a comment.


Comments

There are no comments or no comments have been made public for this article.

Downloads

Download Preprint

Authors

Katarzyna Markowska, Michał Wawrzynowicz , Lechosław Kuczyński

Abstract

1. Metacommunity theory unifies ecology by integrating local biotic interactions with regional dispersal and environmental filtering. However, testing theoretical predictions against empirical data remains challenging due to the difficulty of disentangling these processes in nature and the confounding effects of imperfect detection.

2. Here, we introduce mrangr, an R package designed for the mechanistic, spatially explicit simulation of multispecies communities. Unlike correlative approaches, mrangr strictly distinguishes between the fundamental niche (determined by abiotic carrying capacity) and the realised niche (an emergent property of biotic interactions).

3. The package implements a generalized Lotka-Volterra framework on a lattice grid (via the terra ecosystem), allowing users to simulate diverse interaction types — including competition, predation, and facilitation — alongside species-specific dispersal kernels. A defining feature is the "Virtual Ecologist" module, which samples the simulated "ground truth" with user-defined observation errors and sampling designs, thereby mimicking the constraints of real-world biodiversity surveys.

4. We demonstrate the package’s capabilities through three case studies: (i) quantifying the scale-dependent effects of dispersal on α, β, and γ diversity, (ii) testing the conditions under which the competition-colonization trade-off promotes coexistence in the presence of fitness inequalities, and (iii) assessing the recoverability of fundamental niches from imperfect observational data constrained by biotic interactions.

5. By providing a flexible platform to generate synthetic data with known underlying mechanisms, mrangr enables researchers to benchmark statistical models, assess sampling strategies, and rigorously test hypotheses at the interface of theoretical and empirical macroecology.

DOI

https://doi.org/10.32942/X2FQ0W

Subjects

Life Sciences

Keywords

metacommunity dynamics, fundamental and realized niche, community assembly, process-based modelling, virtual ecologist, spatially explicit

Dates

Published: 2026-02-17 11:48

Last Updated: 2026-02-17 11:48

License

CC BY Attribution 4.0 International

Additional Metadata

Conflict of interest statement:
None.

Data and Code Availability Statement:
The data and code are avaliable in the text of the preprint.

Language:
English