Volume 9, Issue 6
APPLICATION
Free Access

tRophicPosition, an r package for the Bayesian estimation of trophic position from consumer stable isotope ratios

Claudio Quezada‐Romegialli

Corresponding Author

E-mail address: claudio.quezada@upla.cl

Fish & Stable Isotope Ecology Laboratory, Instituto de Ciencias Naturales Alexander Von Humboldt, Universidad de Antofagasta, Antofagasta, Chile

Núcleo Milenio INVASAL, Concepción, Chile

Correspondence

Claudio Quezada‐Romegialli

Email: claudio.quezada@upla.cl

Search for more papers by this author
Andrew L. Jackson

Department of Zoology, School of Natural Sciences, Trinity College Dublin, Dublin 2, Ireland

Search for more papers by this author
Brian Hayden

Canadian Rivers Institute and Biology Department, University of New Brunswick, Fredericton, New Brunswick, Canada

Kilpisjärvi Biological Station, University of Helsinki, Kilpisjärvi, Finland

Search for more papers by this author
Kimmo K. Kahilainen

Kilpisjärvi Biological Station, University of Helsinki, Kilpisjärvi, Finland

Department of Environmental Sciences, University of Helsinki, Helsinki, Finland

Search for more papers by this author
Christelle Lopes

Univ Lyon, Université Lyon 1, CNRS, Laboratoire de Biométrie et Biologie Evolutive UMR5558, Villeurbanne, France

Search for more papers by this author
Chris Harrod

Fish & Stable Isotope Ecology Laboratory, Instituto de Ciencias Naturales Alexander Von Humboldt, Universidad de Antofagasta, Antofagasta, Chile

Núcleo Milenio INVASAL, Concepción, Chile

Universidad de Antofagasta Stable Isotope Facility, Universidad de Antofagasta, Antofagasta, Chile

Search for more papers by this author
First published: 30 March 2018
Citations: 36

Abstract

en

  1. Stable isotope analysis provides a powerful tool to identify the energy sources which fuel consumers, to understand trophic interactions and to infer consumer trophic position (TP), an important concept that describes the ecological role of consumers in food webs. However, current methods for estimating TP using stable isotopes are limited and do not fulfil the complete potential of the isotopic approach. For instance, researchers typically use point estimates for key parameters including trophic discrimination factors and isotopic baselines, and do not explicitly include variance associated with these parameters when calculating TP.
  2. We present “tRophicPosition,” an r package incorporating a Bayesian model for the calculation of consumer TP at the population level using stable isotopes, with one or two baselines. It combines Markov Chain Monte Carlo simulations through JAGS and statistical and graphical analyses using R. We model consumer and baseline observations using relevant statistical distributions, allowing them to be treated as random variables. The calculation of TP—a random parameter—for one baseline follows standard equations linking 15N enrichment per trophic level and the trophic position of the baseline (e.g. a primary producer or primary consumer). In the case of two baselines, a simple mixing model incorporating δ13C allows for the differentiation between two distinct sources of nitrogen, thus including heterogeneity derived from alternatives sources of δ15N.
  3. Methods currently implemented in “tRophicPosition” include loading, plotting and summarizing stable isotope data either from multiple sites and/or communities or a local assemblage; loading trophic discrimination factors from an internal database or generating them; defining and initializing a Bayesian model of TP; sampling posterior parameters; analysing, comparing and plotting posterior estimates of TP and other parameters; and calculating a parametric (non‐Bayesian) TP estimate. Additionally, full documentation including examples, multiple vignettes and code are available for download.

Foreign Language Abstract Resumen

es

  1. El análisis de isótopos estables es una poderosa herramienta para identificar qué vías energéticas alimentan a los consumidores, para entender las interacciones tróficas, y también para inferir la posición trófica (PT) de los consumidores, un concepto importante que describe el rol ecológico de los consumidores en las tramas tróficas. Sin embargo, los métodos actuales para estimar la PT utilizando isótopos estables están limitados y no permiten alcanzar el potencial de la aproximación isotópica. Por ejemplo, los investigadores típicamente utilizan estimaciones puntuales de parámetros claves incluyendo factores de discriminación trófica y líneas base isotópicas, y no incorporan explícitamente la varianza asociada con estos parámetros cuando calculan la PT.
  2. Presentamos “tRophicPosition,” un paquete de R para isótopos estables que incorpora un modelo Bayesiano para el cálculo de la PT en consumidores al nivel ecológico de población, con una o dos líneas base. Este paquete combina simulaciones de cadenas de Markov Monte Carlo a través de JAGS y utilizando los análisis estadísticos y gráficos de R. Modelamos las observaciones de consumidores y líneas base utilizando distribuciones estadísticas relevantes, por lo que son tratadas como variables aleatorias. El cálculo de la PT—un parámetro aleatorio—para una línea base considera ecuaciones estándar que vinculan el enriquecimiento en 15N por nivel trófico y el nivel trófico de la línea base (p.e. un productor primario o un consumidor primario). En el caso de dos líneas base, un modelo de mezcla simple incorporando δ13C permite la diferenciación entre dos fuentes distintas de nitrógeno, incluyendo de esta forma la heterogeneidad derivada de fuentes alternativas de δ15N.
  3. Los métodos actualmente implementados en “tRophicPosition” incluyen cargar, graficar y resumir datos de isótopos estables desde múltiples sitios y/o comunidades o ensambles locales; cargar factores de discriminación trófica desde una base de datos interna o generarlos; definir e inicializar un modelo Bayesiano para la PT; muestrear parámetros a posteriori; analizar, comparar y graficar estimaciones a posteriori de la TP y otros parámetros; y calcular una estimación frecuentista (no Bayesiana) para la PT. Adicionalmente, toda la documentación incluyendo ejemplos, distintas viñetas y el código están disponibles para descarga.

1 INTRODUCTION

Stable isotope analysis has provided ecologists with a powerful tool to capture the complexity of trophic interactions (Peterson & Fry, 1987; Vander Zanden, Casselman, & Rasmussen, 1999; Vander Zanden & Rasmussen, 2001), to identify energy sources (Grey, 2016; Peterson, 1999; Phillips et al., 2014) and to infer consumer trophic position (Cabana & Rasmussen, 1994; Post, 2002; Vander Zanden, Cabana, & Rasmussen, 1997). Trophic position (TP) is an important concept used to describe the ecological role of consumers in food webs (Cabana & Rasmussen, 1994; Post, 2002), and typical uses include calculation of food chain length, maximum trophic position, degree of omnivory and bioaccumulation in food webs, among others (Cabana & Rasmussen, 1994; Post, Pace, & Hairston, 2000; Vander Zanden et al., 1997). However, current methods for estimating trophic position using stable isotopes are limited and do not fulfil the potential of the approach. For instance, users often simply compare consumer δ15N with that of a baseline, ignoring the utility provided by including δ13C (e.g. when estimating TP in systems with multiple energy pathways as developed by Post, 2002). Furthermore, researchers typically use point estimates for key parameters including trophic discrimination factors (TDF) (Vander Zanden et al., 1999; Post, 2002; but see Bastos, Corrêa, Winemiller, & Garcia, 2017) and isotopic baselines, and often do not explicitly include within‐population variability, that is shown by individual consumers. A Bayesian approach to calculate TP overcomes many such limitations by explicitly including individual variability and propagating sampling error (of TDF, baselines and higher consumers) in the modelling approach and posterior estimates of parameters (Jackson, Inger, Parnell, & Bearhop, 2011; Parnell et al., 2012; Phillips et al., 2014). Here, we detail an r package that implements a Bayesian approach to calculate TP at the population level.

2 BAYESIAN CALCULATION OF TP

tRophicPosition implements three Bayesian models, depending on the number of baselines and the inclusion of a TDF for carbon (C). The simplest model is:
urn:x-wiley:2041210X:media:mee313009:mee313009-math-0001(1)
where δ15Nc and δ15Nb refer to the δ15N values of consumers and a single baseline, respectively, ΔN is the TDF for nitrogen (N), TP is the trophic position of the consumer, and λ is the trophic position of the baseline (Vander Zanden et al., 1997). The dual baseline Bayesian approach includes a mixing model to discriminate among two distinct sources of C and N, e.g. pelagic vs. benthic or terrestrial vs. aquatic, and extends the single baseline approach using two equations:
urn:x-wiley:2041210X:media:mee313009:mee313009-math-0002(2)
and
urn:x-wiley:2041210X:media:mee313009:mee313009-math-0003(3)
where additional variables δ15Nb1, δ13Cb1, δ15Nb2 and δ13Cb2 refer to the δ15N and δ13C values of baselines 1 and 2, respectively, and α is the proportion of N derived from baseline 1 (Post, 2002; Vander Zanden & Rasmussen, 2001). The full model is based on Equation 2, but α includes the TDF for carbon:
urn:x-wiley:2041210X:media:mee313009:mee313009-math-0004(4)
where the additional variables δ13Cc is the δ13C value of the consumer, and ΔC is the TDF for C (modified from Post, 2002).

In the Bayesian approach, C and N observations of consumers, baselines and TDFs are modelled as random variables, each having a prior normal distribution on their means (by default to the vague urn:x-wiley:2041210X:media:mee313009:mee313009-math-0005, with precision τ = 1/SD2) and a uniform prior distribution on their standard deviations (by default set to the vague urn:x-wiley:2041210X:media:mee313009:mee313009-math-0006), while TP and α are both treated as random parameters. Furthermore, TP is modelled as having a uniform prior distribution and the simple mixing model proportion α as having a Beta distribution prior, whereas λ is fixed. Each of these prior distributions or values can be changed by the user through a specific function to define the respective Bayesian model (see below). The likelihood function assumes a normal distribution with mean defined by the Equations 1-4 and a precision τ = 1/SD2 for each model, on the observed δ15N and δ13C values of consumers.

3 IMPLEMENTATION IN r

tRophicPosition is based on the approach originally coded in BUGS by Lopes et al. (2011). Improved coding, addition and enhancement of models (based on Vander Zanden et al., 1997; Vander Zanden & Rasmussen, 2001; and modified from Post, 2002), and implementation in R using the framework of JAGS (Plummer, 2017) are presented here. JAGS is a cross‐platform program that works with R to allow the analysis of Bayesian models using Markov Chains Monte Carlo simulations. It needs to be installed along with tRophicPosition (see Appendices S1–S4 for details). The basic use of the package tRophicPosition includes: (1) loading, plotting and summarizing isotopic data, (2) defining and initializing a Bayesian model of TP, (3) estimating and plotting posterior TP (Table 1; Figure 1) and (4) performing hypothesis tests comparing two or more posterior estimations of TP and/or α. A thorough use of the package (Table 1) includes generating random data for sensitivity analysis, simulating or calling TDFs from the internal database, extracting isotope data of multiple species from a data frame, performing a multi‐model calculation of TP for one or more consumer groups or species, or performing calculations of TP for multiple species, communities or consumers across time. Additionally, we have included a parametric (non‐Bayesian) calculation of TP based on means, and implemented a parallel calculation of Bayesian TP to make full use of multi‐core processors. Complete use of tRophicPosition is explained in the vignettes included as supplementary material (Appendices S1–S4) and documentation and examples within the package.

Table 1. Main functions included in tRophicPosition grouped by type of analysis
Function Description
Isotope data manipulation
loadIsotopeData() Load isotope data for one consumer from a data frame and convert it to an isotopeData class object
extractIsotopeData() Extract isotope data for multiple species from a data frame and convert them to isotopeData class objects
generateTPData() Generates random stable isotope data (δ15N and δ13C) for trophic position calculation
TDF() Get trophic discrimination factors (TDFs) values from internal database
simulateTDF() Simulate TDFs
summarizeIsotopeData() Summarize isotope data
parametricTP() Parametric (non‐Bayesian) calculation of trophic position, based on means
Screening and plotting data
screenIsotopeData(), plot() Biplot of consumer and baselines
screenFoodWeb() Biplot of a food web, coloured by species and shaped by functional group
credibilityIntervals() Plot of credibility intervals and median for posterior estimations
Bayesian modelling
jagsBayesianModel() Defines a Bayesian model for trophic position calculation
TPmodel() Creates a JAGS model object to calculate trophic position
posteriorTP() Generates random samples from the posterior distribution of a JAGS model
extractPredictiveData() Extracts predictive data of baselines and consumers, if they were monitored when calling posteriorTP()
multiModelTP() Calculation of trophic position for one consumer using one or more Bayesian models
multipleSpeciesTP() Calculation of trophic position for multiple species dataset using one or more Bayesian models
Hypothesis testing
compareTwoDistributions() Compare samples from two posterior distributions and test a hypothesis
pairwiseComparisons() Perform a pairwise comparison between two or more posterior distributions
image
Flowchart showing basic workflow of tRophicPosition

3.1 Basic use of tRophicPosition

Data can be loaded into R according to standard procedures, following the convention of having δ15N values for one consumer and one baseline at least (see Appendix S1 for details). To convert a data frame into an object isotopeData ready to use within the package, we developed the function loadIsotopeData(). By default, this function searches for the columns labelled d13C and d15N and extracts isotope values grouping them according to the FG (i.e. functional group) column that should have “consumer” and “baseline1” as values. An important assumption associated with the accurate estimation of TP is the use of a relevant TDF (McCutchan, Lewis, Kendall, & McGrath, 2003; Post, 2002; Vander Zanden & Rasmussen, 2001). By default, the function loadIsotopeData() uses a ± SD TDF of 3.4 ± 0.98 for N and of 0.4 ± 1.3 for C (Post, 2002). However, the user can easily use other TDF values, including values from meta‐analyses (e.g. McCutchan et al., 2003), the literature or their own values based on experimental estimates of TDFs (e.g. Healy et al., 2017) (see Appendix S2 for details).

Once stable isotope data are loaded into r, the user can undertake some initial graphical analysis using the method plot() (Figure 2a), to ensure that the data processed are correctly loaded and follow the best practices of Phillips et al. (2014). After this initial analysis, the user can decide to use a single or dual baseline (i.e. using only TDF for N) instead of the full (i.e. dual baseline model including TDF for C) Bayesian model, using the function jagsBayesianModel(model = oneBaseline) and changing “oneBaseline” with one of the other models (“twoBaselines” or “twoBaselinesFull”). In this step, the Bayesian approach is implemented, defining priors for any of the parameters and variables involved in the respective model, such as the value for λ (by default is 2, see below for details).

image
Plots generated to analyse trophic position from stable isotope data. (a) Output from plot() method and an isotopeData class object, (b) plot generated with the coda package (Plummer et al., 2006) using the summary() function applied to a posterior distribution of TP and α. Data and figures were generated using the code available in Appendix S5

When the Bayesian model has been chosen and appropriate priors set, the model must be initialized using the function TPmodel() with the stable isotope data, the Bayesian model, and the number of chains as arguments. The number of chains must be ≥2 when summary statistics such as Gelman–Rubin (Gelman & Rubin, 1992) are calculated within tRophicPosition (or e.g. using the package coda; Plummer, Best, Cowles, & Vines, 2006). Markov chain Monte Carlo sampling is then performed by the function posteriorTP(), selecting the variables to monitor and the number of iterations (e.g. posteriorTP(model = model, n.iter = 20000, variable.names = c(TP,” “muDeltaN))). This generates distributions of posterior estimates of TP, α and/or other parameters which are then available for the user to save, plot and analyse (Figure 2b). For multiple models, multiple species and parallel computation of TP, please refer to Appendices S2–S4.

4 CHECKING THE MODEL: CUSTOMIZING PARAMETERS AND PRIORS

Although the default settings will be useful in most cases, users that want to take full advantage of the Bayesian approach may want to customize parameters and priors for the model. The most relevant parameters are (1) λ, which defines the trophic level of the baseline used; (2) the number of chains, needed for checking convergence of independent replicates and (3) the number of adaptive, burn‐in and actual sampling iterations that are the key for getting reliable posterior estimates of TP and α and to perform model‐checking. λ may be changed from the default value of two, to any trophic level that coincides to the baseline used, during the call to the jagsBayesianModel function (e.g. jagsBayesianModel(lambda = 1) for a baseline equal to 1, or even using a non‐integer baseline with jagsBayesianModel(lambda = 2.5) if desired). A number of chains ≥2 is required both to calculate summary statistics of convergence and to check the reliability of posterior inference of parameters. The function coda::gelman.diag(samples) will calculate a potential scale reduction factor and its upper limits (provided that the coda package is installed, and the object samples has the posterior estimates of TP, α and/or other parameters inferred with the tRophicPosition function posteriorTP). Gelman and Rubin (1992) indicated that values close to 1 for the potential scale reduction factor and its upper limit indicate that convergence was achieved and more iterations will not improve estimations of posterior distributions of parameters. Also, a well‐mixed posterior distribution (such as the one shown in Figure 2b) is another clear and simple way of checking the convergence of parameters of interest. If chains are not converging, it may suggest that the model was badly specified, the TDF values or the data of consumers or baselines are not normally distributed, or that the model requires more iterations to achieve convergence. Longer simulations can be achieved by extending both the burn‐in or the actual sampling. While the adaptive phase is not used in the posterior inference of the model, burn‐in discards an initial amount of iterations and extends the actual sampling, thus, increases the likelihood of achieving convergence of posterior distributions of parameters. By default, there are 10,000 adaptive samplings, 10,000 iterations and no burn‐in, but they can be changed within the call to the functions TPmodel (e.g. TPmodel(n.adapt = 20000) for increasing adaptive sampling), posteriorTP (e.g. posteriorTP(n.init = 20000, burn‐in = 20000) for increasing both actual sampling and burn‐in) multiModelTP() and multiSpeciesTP() (and using the same arguments n.adapt, n.init and burn‐in for the two last functions). Preliminary tests show that changing priors does not have a large effect on posterior distributions for the models currently implemented in tRophicPosition, which suggests that using non‐skewed, normally distributed data with enough observations of consumer and baselines has greater influence on the modelling approach than modifying priors. Still, users can change any prior distribution within the call to jagsBayesianModel using the distributions available in the bugs module (a complete list is found in Plummer, 2017, p. 43). However, users will typically use as priors a normal distribution (e.g. jagsBayesianModel(TP = dnorm(4, 0.5)), for a normally distributed prior for TP with M = 4 and SD = 0.5), a beta distribution (e.g. jagsBayesianModel(alpha = dbeta (1, 10)), for a beta distributed prior for α, with parameters a = 1 and b = 10) or a uniform prior (e.g. jagsBayesianModel(TP = dunif(2, 10)), for a uniform prior for TP, with limits within [2, 10]). We recall that the distributions used as arguments in jagsBayesianModel() not necessarily are the same as those used in r, so users should check Plummer (2017) for details and using other custom distributions as priors.

Once the Bayesian model has been built and the posterior distribution of all parameters has been computed, the important step of model‐checking is a crucial task to include in any statistical analysis (Gelman et al., 2014). One way of performing model‐checking is applying predictive posterior checks. The idea behind this is that if the model fits, then replicated data generated under the model should look similar to observed data. If the observed data differ from the simulated data, then the Bayesian model has failed in some way to model the true data generating process, which may imply that the model‐based estimates of TP or α might be inaccurate. In the three Bayesian models implemented in tRophicPosition users can generate, and then extract the δ13C and δ15N stable isotope data generated from the posterior predictive distribution for each baseline and consumer, and compare them with the observed data (see Appendix S1 for details). As the raw data from posterior predictive distributions are available using the function extractPredictiveData(posterior) (where posterior is the object that has the posterior distribution of predicted parameters), users can calculate correlations, the root mean squared differences between observed and predicted data, or any other summary or statistic from them, such as those shown in Figure 3 or specialized software such as the r package DHARMa (Hartig, 2017).

image
Posterior predictive model‐checking plots for the example shown in Figure 2. (a) Raw residuals of δ15N predicted and δ15N observed data. (b) Histogram of the δ15N observed data superimposed with a density function of the δ15N predicted data. Data and figures were generated using the code available in Appendix S5

5 ASSUMPTIONS AND LIMITATIONS

The three Bayesian models included in the current version of the package were not coded as hierarchical models; thus, the multiple models, multiple species and parallel calculations of TP and α are fitted independently for each consumer. With this in mind, users can change the freely available code to their own needs, for example including non‐normal distributions for consumers and baselines in the likelihood functions of any of the models included in tRophicPosition, or modify them into a hierarchical version. An important aspect of these models is that the TDFs are incorporated into the models as raw data, instead of using a M and SD as seen in other software. This approach was implemented to propagate uncertainty in TDF knowledge of the system under study into the model, and users must be aware that using a reduced number of TDF observations will have a great impact on the posterior inference of parameters (see Appendix S2 for details). The selection of a representative TDF is a key aspect of any isotopic analysis (Phillips et al., 2014).

6 CASE STUDIES SHOWING THE CAPACITIES OF THE PACKAGE

We illustrate the functionality of the package using three case studies from freshwater and marine ecosystems (see Appendix S4).

In the first example (Figure 4a), we use data from two relatively large and deep oligotrophic Finnish lakes Inarijärvi and Kilpisjärvi to calculate TP among 15 freshwater fish species and maximum TP (MTP) per lake (Post et al., 2000; Thomas, Harrod, Hayden, Malinen, & Kahilainen, 2017). This case study represents a typical analysis used by researchers when they compare TP differences among species or groups of consumers (e.g. fish morphs) within or even between ecosystems. Figure 4a shows TP calculated with a one baseline Bayesian model (baseline δ15N was similar for benthic and pelagic baselines in both lakes, see Appendix S4), showing differences between some common species, and that MTP was similar in the two lakes.

image
Case studies illustrating typical uses of tRophicPosition: (a) Variation in estimated TP of different fish species and whitefish morphs from Lakes Inarijärvi and Kilpisjärvi, ordered by modal TP values. The horizontal dotted line shows maximum trophic position, which is similar in the two lakes. (b) Variation in δ15N, TP and α (relative use of pelagic‐derived N) in bilagay (a benthic rockfish in N Chile) along a latitudinal gradient. The upper panel indicates ± SD δ15N of bilagay, the mid‐panel shows posterior TP estimations and lower panel shows estimated α at each location. (c) Variation in posterior TP and α estimated for 10 fork length deciles (range 45–295 mm) of roach from Lough Neagh (whole population estimate shown in blue). In all graphs, bars show 95% credibility interval of each posterior TP and estimates. For more details of case studies, please see Appendix S4

The second example (Figure 4b) represents a common situation where TP is compared within a species, e.g. across space or time. Here, we use data from a benthic rockfish common to the coastal kelp forests of Northern Chile, bilagay Cheilodactylus variegatus, which, along with filter feeding and grazing molluscs (representing pelagic and benthic baselines, respectively) were sampled from a series of different locations (see Appendix S4 and Docmac, Araya, Hinojosa, Dorador, & Harrod, 2017). In this example, our question is: given the potential influences of local differences in diet stomach contents and upwelling intensity (which increases along the S–N gradient), are there measurable differences in bilagay TP between the different locations along a S–N latitudinal gradient? The results show that bilagay δ15N values differ considerably according to location, but posterior estimates of TP were largely similar.

The third example examines if a consumer shows an ontogenetic shift in TP. tRophicPosition provides TP estimates at a population level, and here we examine how TP varies across different size classes of the omnivorous fish the roach, Rutilus rutilus, captured from Lough Neagh, Northern Ireland (Figure 4c). Fish were placed into deciles based on their fork length (mm) and we compared TP across different size classes. The results clearly showed an ontogenetic shift and that juvenile fish (<70 mm) had a higher TP than larger individuals. This fits well with observations of gut contents that show a switch from zooplanktivory to omnivory at this size in this system (C.H., unpublished data).

ACKNOWLEDGEMENTS

We thank Patricia Peinado and Felipe Docmac for processing stable isotope data for bilagay. This manuscript and the r package were greatly improved thanks to the suggestions of two anonymous reviewers and the associate editor, Nick Golding. This work was supported by: CONICYT Fondecyt postdoctoral grant 3160659 to C.Q.‐R., Academy of Finland 140903 and 1268566 to K.K.K., CONICYT Fondecyt 1151515 and 1150042, MEC 80095003 and MEL 81105006 to C.H. UASIF is funded by CONICYT Fondequip V—EQM160171. C.Q.‐R. and CH are supported by Núcleo Milenio INVASAL funded by Chile's government program, Iniciativa Científica Milenio from Ministerio de Economía, Fomento y Turismo.

    AUTHORS’ CONTRIBUTIONS

    C.Q.‐R., C.L., C.H. and A.L.J. conceived the ideas. C.Q.‐R. developed the model, with inputs from C.H. and A.L.J., C.H., B.H. and K.K.K. collected data, C.Q.‐R. and C.H. analysed the data, C.Q.‐R. and C.H. led the writing of the manuscript. All authors contributed critically to the drafts and gave final approval for publication.

    7 DATA ACCESSIBILITY

    Package documentation includes a short guide to the use, multiple models and multiple species calculation of TP and can be found in the supplementary material (Appendices S1–S3), and vignettes included within the package (browseVignettes(tRophicPosition)). An expanded description and r code of the examples and figures generated in this manuscript can be found in supplementary material S4 and S5, respectively.

    tRophicPosition is under active development. Future versions of the package will include different methods and hierarchical models including the use of scaled TDFs (Hussey et al., 2014) and the estimation of consumer TP from amino acid δ15N (Bradley et al., 2015) that include variation in TDF and β. The development version is freely available in GitHub (https://github.com/clquezada/tRophicPosition), while the stable version (currently 0.7.5) can be found in CRAN (https://cran.r-project.org/package=tRophicPosition).

      Number of times cited according to CrossRef: 36

      • Effects of preservation methodology on stable isotope compositions of sea stars, Rapid Communications in Mass Spectrometry, 10.1002/rcm.8589, 34, 2, (2020).
      • Feeding Ecology of Age‐0 Gar at Texoma Reservoir Inferred from Analysis of Stable Isotopes, North American Journal of Fisheries Management, 10.1002/nafm.10436, 40, 3, (638-650), (2020).
      • Resource‐use dynamics of co‐occurring chondrichthyans from the First Coast, North Florida, USA, Journal of Fish Biology, 10.1111/jfb.14238, 96, 3, (570-579), (2020).
      • Short‐ and long‐term diets of the threatened longhorned pygmy devil ray, Mobula eregoodoo determined using stable isotopes, Journal of Fish Biology, 10.1111/jfb.14381, 97, 2, (424-434), (2020).
      • A Journey Into The Landscape Of Past Feeding Habits: Mapping Geographic Variations In The Isotope (Δ15n) -Inferred Trophic Position Of Prehistoric Human Populations, Quaternary International, 10.1016/j.quaint.2020.01.023, (2020).
      • Hatchetfishes (Stomiiformes: Sternoptychidae) biodiversity, trophic ecology, vertical niche partitioning and functional roles in the western Tropical Atlantic, Progress in Oceanography, 10.1016/j.pocean.2020.102389, (102389), (2020).
      • Temporal variability in the trophic composition of benthic invertebrates in the indian Sub-Antarctic Ocean, Deep Sea Research Part I: Oceanographic Research Papers, 10.1016/j.dsr.2020.103340, (103340), (2020).
      • Humpback whales (Megaptera novaeangliae) breeding off Mozambique and Ecuador show geographic variation of persistent organic pollutants and isotopic niches, Environmental Pollution, 10.1016/j.envpol.2020.115575, 267, (115575), (2020).
      • Trophic dynamics of a reservoir fishery following an introduction of a top predator: Insights from stable carbon and nitrogen isotopes, Fisheries Management and Ecology, 10.1111/fme.12445, 27, 5, (531-539), (2020).
      • Stable isotopes reveal niche segregation between native and non‐native Hoplias in a Neotropical floodplain, Ecology of Freshwater Fish, 10.1111/eff.12536, 29, 4, (602-610), (2020).
      • Zonal and depth patterns in the trophic and community structure of hyperiid amphipods in the Southeast Pacific., Deep Sea Research Part I: Oceanographic Research Papers, 10.1016/j.dsr.2020.103402, (103402), (2020).
      • Primary production and depth drive different trophic structure and functioning of fish assemblages in French marine ecosystems, Progress in Oceanography, 10.1016/j.pocean.2020.102343, (102343), (2020).
      • Food web characteristics of fish communities across degraded lakes provide insights for management in multi-stressor environments, Aquatic Ecology, 10.1007/s10452-020-09750-4, (2020).
      • Studying animal niches using bulk stable isotope ratios: an updated synthesis, Oecologia, 10.1007/s00442-020-04654-4, (2020).
      • Stable isotope niche convergence in coexisting native and non-native salmonids across age classes, Canadian Journal of Fisheries and Aquatic Sciences, 10.1139/cjfas-2019-0186, (1-7), (2020).
      • High Trophic Niche Overlap between a Native and Invasive Mink Does Not Drive Trophic Displacement of the Native Mink during an Invasion Process, Animals, 10.3390/ani10081387, 10, 8, (1387), (2020).
      • The trophic ecology of partial migration: insights from Merluccius australis off NW Patagonia, ICES Journal of Marine Science, 10.1093/icesjms/fsaa065, (2020).
      • Trophic ecology of invasive marbled and spiny-cheek crayfish populations, Biological Invasions, 10.1007/s10530-020-02328-z, (2020).
      • Mechanisms of trophic niche compression: Evidence from landscape disturbance, Journal of Animal Ecology, 10.1111/1365-2656.13142, 89, 3, (730-744), (2019).
      • Trophic position and individual feeding habits as drivers of differential PCB bioaccumulation in fish populations, Science of The Total Environment, 10.1016/j.scitotenv.2019.04.196, 674, (472-481), (2019).
      • Trophodynamics of Southern Ocean pteropods on the southern Kerguelen Plateau, Ecology and Evolution, 10.1002/ece3.5380, 9, 14, (8119-8132), (2019).
      • Re-examining trophic dead ends: stable isotope values link gelatinous zooplankton to leatherback turtles in the California Current, Marine Ecology Progress Series, 10.3354/meps13117, 632, (205-219), (2019).
      • Sample acidification has a predictable effect on isotopic ratios of particulate organic matter along the Chilean coast, Rapid Communications in Mass Spectrometry, 10.1002/rcm.8511, 33, 21, (1652-1659), (2019).
      • Diverse resource-use strategies in a large-bodied marine predator guild: evidence from differential use of resource subsidies and intraspecific isotopic variation, Marine Ecology Progress Series, 10.3354/meps12982, 623, (71-83), (2019).
      • Stable isotope ratios of carbon, nitrogen and sulphur and mercury concentrations as descriptors of trophic ecology and contamination sources of Mediterranean whales, Chemosphere, 10.1016/j.chemosphere.2019.124448, (124448), (2019).
      • Increased sea ice cover alters food web structure in East Antarctica, Scientific Reports, 10.1038/s41598-019-44605-5, 9, 1, (2019).
      • Niche-related processes in island intertidal communities inferred from stable isotopes data, Ecological Indicators, 10.1016/j.ecolind.2019.05.039, 104, (648-658), (2019).
      • Global review and inventory: how stable isotopes are helping us understand ecology and inform conservation of marine turtles, Marine Ecology Progress Series, 10.3354/meps12889, 613, (217-245), (2019).
      • Network-Based Biomonitoring: Exploring Freshwater Food Webs With Stable Isotope Analysis and DNA Metabarcoding, Frontiers in Ecology and Evolution, 10.3389/fevo.2019.00395, 7, (2019).
      • Food chain length and trophic niche of a key predator in montane desert streams, Hydrobiologia, 10.1007/s10750-019-04115-x, (2019).
      • Shared Histories of Co-evolution May Affect Trophic Interactions in a Freshwater Community Dominated by Alien Species, Frontiers in Ecology and Evolution, 10.3389/fevo.2019.00355, 7, (2019).
      • Clarifying a trophic black box: stable isotope analysis reveals unexpected dietary variation in the Peruvian anchovy Engraulis ringens , PeerJ, 10.7717/peerj.6968, 7, (e6968), (2019).
      • Organic matter resources fuelling food webs in a human-modified lowland river: importance of habitat and season, Hydrobiologia, 10.1007/s10750-019-04011-4, (2019).
      • Baseline assessment of heavy metals content and trophic position of the invasive blue swimming crab Portunus segnis (Forskål, 1775) in the Gulf of Gabès (Tunisia), Marine Pollution Bulletin, 10.1016/j.marpolbul.2018.09.037, 136, (454-463), (2018).
      • Long-term trends in the foraging ecology and habitat use of an endangered species: an isotopic perspective, Oecologia, 10.1007/s00442-018-4279-z, (2018).
      • Trophic structure of frog assemblages in coastal habitats in southern Brazil, Austral Ecology, 10.1111/aec.12920, 0, 0, (undefined).