MetaLandSim

Metapopulations Persistence and Range Expansion Simulation

This package is described in detail in the following publication:

Mestre, F., Cánovas, F., Pita, R., Mira, A., & Beja, P. (2016). An R package for simulating metapopulation dynamics and range expansion under landscape scenarios. Environmental Modelling & Software, 75, 402–406. https://doi.org/10.1016/j.envsoft.2016.03.007

MetaLandSim is an R package designed to simulate metapopulation dynamics and range expansion within dynamic landscapes. It provides a virtual environment that enables experimentation and simulation of ecological processes at two scales: landscape and range. By integrating concepts from metapopulation and graph theories, MetaLandSim facilitates the modeling of species persistence and dispersal across heterogeneous and changing habitats.

Features

Installation

MetaLandSim is available on CRAN and can be installed using the following command in R:

install.packages("MetaLandSim")

To install the development version from GitHub:

# Install devtools if not already installed
install.packages("devtools")

# Install MetaLandSim from GitHub
# devtools::install_github("FMestre1/MetaLandSim")
install.packages("MetaLandSim", repos = c('https://fmestre1.r-universe.dev', 'https://cloud.r-project.org'))

Usage

Here's a basic example of how to use MetaLandSim:

# Load the package
library(MetaLandSim)

# Generate a random landscape with 100 patches
landscape <- rland.graph(npatch = 100, areaM = 50, distM = 1000)

# Simulate metapopulation dynamics over 20 time steps
simulation <- iterate.graph(rl = landscape, npatch = 100, nyears = 20)

# Plot the resulting landscape
plot_graph(landscape)

# Compute connectivity metrics
metrics <- metrics.graph(rl = landscape, metric = "NC")  # Number of components

For detailed tutorials and examples, refer to the package vignettes:

Documentation

Comprehensive documentation is available:

Citation

If you use MetaLandSim in your research, please cite the following publication:

Mestre, F., Cánovas, F., Pita, R., Mira, A., & Beja, P. (2016). An R package for simulating metapopulation dynamics and range expansion under landscape scenarios. Environmental Modelling & Software, 75, 402–406. https://doi.org/10.1016/j.envsoft.2016.03.007

Authors

License

MetaLandSim is licensed under the GPL-2 or GPL-3 license.