Related Experiment Video
Updated: Aug 6, 2026

A Precise and Autonomous System for the Detection of Insect Emergence Patterns
Published on: January 9, 2019
figsimR: An R Package for Simulating Fig-Wasp Community Dynamics
Yiyi Dong1,2, Simon T Segar3, Qingbei Weng1,4
1Qiannan Normal University for Nationalities Duyun China.
Abstract:
Fig-fig wasp systems represent a widely applicable but underutilized framework for community assembly research, yet their multi-trophic structure and species interactions substantially increase the complexity of community simulation. We present figsimR, an open-source, modular R package that implements fig wasp community simulation via a single high-level function, simulate_figwasp_community(), with controllable mechanisms and reproducible workflows. The simulation runs at the individual-fig level and records species-specific wasp activity and outcomes, including but not limited to egg production, host-specific parasitism, final fig wasp emergence, seed production, flower availability, and ovule-resource use within each fig. The package also provides functions for calculating commonly used diversity and community-summary metrics, allowing fig-level community outputs to support downstream comparison and model diagnostics. We demonstrate a typical workflow-parameter setup, simulation, and metric calculation-on fig wasp communities associated with Ficus racemosa as a worked example using an agent-based model that integrates documented biological traits and available data for this system. We also show how the package can be used to assess a baseline model's goodness-of-fit and to dissect the asymmetric contributions of individual processes (e.g., ovule-layer stratification and alternative fig-retention rules, including host-sanction and sink strength) using the built-in "mechanism knockout" framework (allowing to quantify the contribution for each mechanism in community assembly). Including both mean fit and variance coverage as joint diagnostics, reveals mean-variance trade-offs across mechanisms. Although the worked example is parameterized for F. racemosa in this study, figsimR is not restricted to a single Ficus species. Users can adapt the framework to other Ficus-fig wasp systems by supplying necessary biological parameters. figsimR, therefore, provides a reproducible and extensible tool for evaluating how far known biological mechanisms can explain observed community properties.
Related Concept Videos
Mechanistic Models: Compartment Models in Individual and Population Analysis
Parametric Survival Analysis: Weibull and Exponential Methods
Weibull Distribution
The Weibull distribution is a flexible model used in parametric survival analysis. It can handle both increasing and decreasing hazard rates, depending on its shape parameter...
Distributions to Estimate Population Parameter
Pollination and Flower Structure

