Post provided by Ludmilla Figueiredo
Nature is very dynamic: forests transform through the seasons and regrow after fire, insect plagues happen with little to no forewarning, and animals like the Fernandina giant tortoise and the leopard-spotted fish come back from the dead decades after apparent extinction. Some of these changes are part of the natural behaviour of these systems, but some are a response to disturbance. In the Anthropocene, when ecosystems are subjected to a variety of threats like pollution, catastrophic rains, and extreme temperatures, it is particularly important to understand how the natural world is responding to them. What makes an ecosystem robust to change? Is it the number of species? Is it the connection between them?
Ecologists have been discussing this for many decades, which led to a variety of definitions of what ecological stability even is. Very theoretical in its nature, this debate led to the emergence of 163 definitions of 70 concepts of stability in ecological literature at some point (Grimm & Wissel 1997). Viktoriia Radchuk was pondering on whether we need several stability properties or can be satisfied with measuring one of them (e.g., Radchuk et al., 2019), what makes some researchers to use some metrics over the others? How after decades of research in stability ecology can we move forward and start distilling general patterns? In 2019 she captained the push to have the most commonly used properties available in a single toolbox. Having myself been pulled by the allure of predicting ecosystems’ responses to disturbances since my Bachelors (which led me to study ecological modelling and extinction debts throughout my Master’s and PhD), I was very excited to come on board. I came in to lead writing and coding, and we were joined by our team of co-authors, including various experts in ecological dynamics, mathematics, and coding. From that effort, we developed estar, a package to measure Ecological STAbility in R. A fun fact about the name: even though CRAN doesn’t allow the official title of the package to state “in R”, that description allowed me to sneak in a Brazilian Portuguese name for the package: “estar” can be translated as “to be in a place or state”, which I find rather fitting for the study of stability.
Studying stability is hard…
We set out to build a package that consolidates the various ways stability had been measured in the literature. Moreover, we wanted to enable researchers to analyse stability using the data they collect from real world systems.
This task poses two major challenges. The first is the amount of data required for reliable assessments of stability. Long time-series are rare, so we expect this to be an issue that most of our package users will have to deal with. Imagine you want to measure whether and how an owl population is recovering after a massive forest fire. To properly characterise the population, you would need frequent measures of the population size before and after the fire, to identify the “usual”, reference dynamics of the population and any potential cycles (i.e. whether the population naturally grows and shrinks over time). This is seldom the case, however, that populations or communities are followed over long periods of time. Although citizen science efforts and long-term monitoring studies are increasing the availability of data, more often than not, data is available for short intervals and/or collected at inconsistent frequencies, especially for the periods before disturbance strikes. This could mean that the reference state of the system is not robustly captured and, for example, that population cycles in our owls are not identified. Our approach to this problem was to give the user a lot of control to determine what constitutes a reference for their study system. In the case of our owls, the reference (or baseline, as we call it in the paper) could be the population size observed before the fire, another population in a similar condition, or a value known from the literature. The more data available to inform these values, the better. However, in the absence of good data, users can still explore scenarios and even investigate which type of data is critical for each metric.
The second challenge was making theoretical metrics derived from mathematical models usable by empirical researchers. These metrics require data on species interaction strengths, which are hard to measure. The strength of an interaction is the effect of the population size of one species on the growth rate of another. For example, in a forest, it would be how much owls affect the populations of their prey and vice versa. For the development of the estar, we could luckily rely on the MARSS package to estimate interaction strength from time-series data on the abundance of interacting species, through “Multivariate Autoregressive State-Space” models. We hope that integrating these two steps (estimating the interaction matrix and calculating the stability metric) into a single package will facilitate the study of stability in ways so far seldom explored in field studies focusing on community stability.

But writing an R package is so much fun
A third personal challenge for me was the writing process. Since starting this project, I left the postdoc life and moved to Leipzig, Germany, where I now work as the data and code curator for the German Centre for Integrative Biodiversity Research (iDiv). The novelty of the city, the job, and the new colleagues took its toll, delaying the writing process. Luckily, however, the well-structured process established for writing an R package made it much more fun and easier to get back into it. The R developing ecosystem is very supportive, in the sense that, as you write code for the package following the development workflow devised by Hadley Wickham and Jennifer Bryan (https://r-pkgs.org/), you are consistently reminded of inconsistent names of arguments, failing tests, and, very importantly, missing documentation. Therefore, while the more mathematical parts were quite challenging, constraining myself to explain one function at a time gave me solid steps for a Pomodoro-based writing schedule: after documenting or revising one function, I could rest. From the flow I got into while writing the documentation, it was easier to move into the broader presentation and discussion required for the article.
Another unexpectedly fun part of developing an R package was designing the famous hex sticker. Although not mandatory, I wouldn’t miss the chance to let my creative side loose and summarise the package’s features in a single, iconic image. We had versions in which we played with the writing of “e-star” to evoke Robert Paine’s famous studies of trophic cascades involving the Pisaster starfish. In the end, however, my very limited designer abilities led me to choose a, yes, more conservative-looking hex, but one that translates our hope for this project: that a variety of systems dynamics can be taken in and studied with estar.
Read the full article here.
References
Grimm, V., & Wissel, C. (1997). Babel, or the ecological stability discussions: An inventory and analysis of terminology and a guide for avoiding confusion. Oecologia, 109(3), 323–334. https://doi.org/10.1007/s004420050090
Radchuk, V., Laender, F. D., Cabral, J. S., Boulangeat, I., Crawford, M., Bohn, F., Raedt, J. D., Scherer, C., Svenning, J.-C., Thonicke, K., Schurr, F. M., Grimm, V., & Kramer‐Schadt, S. (2019). The dimensionality of stability depends on disturbance type. Ecology Letters, 22(4), 674–684. https://doi.org/10.1111/ele.13226