Skip to main content

Advertisement

Log in

dietr: an R package for calculating fractional trophic levels from quantitative and qualitative diet data

  • Primary Research Paper
  • Published:
Hydrobiologia Aims and scope Submit manuscript

Abstract

This article introduces an R package, dietr, which calculates fractional trophic levels from quantitative diet item and qualitative food item data following the routine implemented in TrophLab within the open source R environment. dietr is easy to use and can quickly calculate trophic levels for many diet records. In addition to calculating trophic levels following the TrophLab routines, users can also specify a taxonomic hierarchy and estimate trophic levels at multiple taxonomic levels in a single call of a function. Additionally, dietr works well with FishBase data obtained in R using rfishbase and comes with pre-made databases of prey trophic levels that users can utilize for estimating trophic levels. dietr can also calculate several prey electivity indices. I provide information on dietr’s performance and provide a use case example of how dietr can be used on an empirical dataset. Trophic levels for hundreds of specimens can be calculated in a few seconds and the flexibility of dietr’s input allows users to easily calculate trophic levels from their own data.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2

Similar content being viewed by others

Data Availability

The code and data used to carry out the analysis are provided on the GitHub repository page for the package and are available here: https://github.com/sborstein/dietr.

References:

  • Boettiger, C., D. T. Lang & P. C. Wainwright, 2012. rfishbase: exploring, manipulating and visualizing FishBase data from R. Journal of Fish Biology 81: 2030–2039.

    Article  CAS  Google Scholar 

  • Borstein, S. R., J. A. Fordyce, B. C. O’Meara, P. C. Wainwright & M. D. McGee, 2019. Reef fish functional traits evolve fastest at trophic extremes. Nature Ecology & Evolution 3: 191–199.

    Article  Google Scholar 

  • Chesson, J., 1983. The estimation and analysis of preference and its relationship to foraging models. Ecology 64: 1297–1304.

    Article  Google Scholar 

  • Christensen, V. & D. Pauly, 1992. ECOPATH II—a software for balancing steady-state ecosystem models and calculating network characteristics. Ecological Modelling 61: 169–185.

    Article  Google Scholar 

  • Christensen, V. & D. Pauly, 1993. Trophic models of aquatic ecosystems, vol 26. WorldFish.

  • Christensen, V. & C. J. Walters, 2004. Ecopath with Ecosim: methods, capabilities and limitations. Ecological Modelling 172: 109–139.

    Article  Google Scholar 

  • Cortés, E., 1999. Standardized diet compositions and trophic levels of sharks. ICES Journal of Marine Science 56: 707–717.

    Article  Google Scholar 

  • Cresson, P., S. Ruitton, M. Ourgaud & M. Harmelin-Vivien, 2014. Contrasting perception of fish trophic level from stomach content and stable isotope analyses: a Mediterranean artificial reef experience. Journal of Experimental Marine Biology and Ecology 452: 54–62.

    Article  Google Scholar 

  • Duffy, J. E., B. J. Cardinale, K. E. France, P. B. McIntyre, E. Thébault & M. Loreau, 2007. The functional role of biodiversity in ecosystems: incorporating trophic complexity. Ecology Letters 10: 522–538.

    Article  Google Scholar 

  • Essington, T. E., A. H. Beaudreau & J. Wiedenmann, 2006. Fishing through marine food webs. Proceedings of the National Academy of Sciences of the United States of America 103: 3171–3175.

    Article  CAS  Google Scholar 

  • Froese, R. & D. Pauly, 2000. FishBase 2000: Concepts Designs and Data Sources. ICLARM, Laguna, Philippines.

    Google Scholar 

  • Froese, R. & D. Pauly, 2019. FishBase. http://www.fishbase.org/.

  • Grosholz, E., 2002. Ecological and evolutionary consequences of coastal invasions. Trends in Ecology & Evolution 17: 22–27.

    Article  Google Scholar 

  • Horn, M., S. Murray & T. Edwards, 1982. Dietary selectivity in the field and food preferences in the laboratory for two herbivorous fishes (Cebidichthys violaceus and Xiphister mucosus) from a temperate intertidal zone. Marine Biology 67: 237–246.

    Article  Google Scholar 

  • ICES, 2012. ICES-CIEM Stomach Data (1981-2010). http://ecosystemdata.ices.dk/stomachdata/index.aspx.

  • Ivlev, U., 1961. Experimental ecology of the feeding of fish. Yale University Press, New Haven.

    Google Scholar 

  • Jacobs, J., 1974. Quantitative measurement of food selection. Oecologia 14: 413–417.

    Article  Google Scholar 

  • Jones, K. E., J. Bielby, M. Cardillo, S. A. Fritz, J. O’Dell, C. D. L. Orme, K. Safi, W. Sechrest, E. H. Boakes & C. Carbone, 2009. PanTHERIA: a species-level database of life history, ecology, and geography of extant and recently extinct mammals. Ecology 90: 2648.

    Article  Google Scholar 

  • Leibold, M. A., M. Holyoak, N. Mouquet, P. Amarasekare, J. M. Chase, M. F. Hoopes, R. D. Holt, J. B. Shurin, R. Law & D. Tilman, 2004. The metacommunity concept: a framework for multi-scale community ecology. Ecology Letters 7: 601–613.

    Article  Google Scholar 

  • Magalhaes, I. S., C. P. Ornelas-Garcia, M. Leal-Cardin, T. Ramirez & M. Barluenga, 2015. Untangling the evolutionary history of a highly polymorphic species: introgressive hybridization and high genetic structure in the desert cichlid fish Herichtys minckleyi. Molecular Ecology 24: 4505–4520.

    Article  CAS  Google Scholar 

  • Mancinelli, G., S. Vizzini, A. Mazzola, S. Maci & A. Basset, 2013. Cross-validation of δ15N and FishBase estimates of fish trophic position in a Mediterranean lagoon: the importance of the isotopic baseline. Estuarine, Coastal and Shelf Science 135: 77–85.

    Article  CAS  Google Scholar 

  • Manly, B., 1974. A model for certain types of selection experiments. Biometrics 30: 281–294.

    Article  Google Scholar 

  • Marczak, L. B., R. M. Thompson & J. S. Richardson, 2007. Meta-analysis: trophic level, habitat, and productivity shape the food web effects of resource subsidies. Ecology 88: 140–148.

    Article  Google Scholar 

  • Mittelbach, G., C. Osenberg & M. Leibold, 1988. Trophic relations and ontogenetic niche shifts in aquatic ecosystems Size-structured populations. Springer, New York: 219–235.

    Google Scholar 

  • Odum, W. E. & E. J. Heald, 1975. The detritus-based food web of an estuarine mangrove community. In Cronin, L. E. (ed.), Estuarine Research, Vol. 1. Academic Press, New York: 265–286.

    Google Scholar 

  • Palomares, M. L. D. & D. Pauly, 2019. SeaLifeBase. https://www.sealifebase.org/.

  • Pauly, D., V. Christensen, J. Dalsgaard, R. Froese & F. Torres, 1998. Fishing down marine food webs. Science 279: 860–863.

    Article  CAS  Google Scholar 

  • Pauly, D., R. Froese, P. Sa-a, M. Palomares, V. Christensen & J. Rius, 2000. TrophLab manual. ICLARM, Manila, Philippines.

    Google Scholar 

  • Pimm, S. L., J. H. Lawton & J. E. Cohen, 1991. Food web patterns and their consequences. Nature 350: 669.

    Article  Google Scholar 

  • Polito, M. J., W. Z. Trivelpiece, N. J. Karnovsky, E. Ng, W. P. Patterson & S. D. Emslie, 2011. Integrating stomach content and stable isotope analyses to quantify the diets of pygoscelid penguins. PLoS ONE 6: e26642.

    Article  CAS  Google Scholar 

  • Post, D. M., 2002a. The long and short of food-chain length. Trends in Ecology & Evolution 17: 269–277.

    Article  Google Scholar 

  • Post, D. M., 2002b. Using stable isotopes to estimate trophic position: models, methods, and assumptions. Ecology 83: 703–718.

    Article  Google Scholar 

  • R Development Core Team, 2020. R: A language and environment for statistical computing. In: R Foundation for Statistical Computing.

  • Rojas, D., M. J. Ramos Pereira, C. Fonseca & L. M. Dávalos, 2018. Eating down the food chain: generalism is not an evolutionary dead end for herbivores. Ecology Letters 21: 402–410.

    Article  Google Scholar 

  • Rybczynski, S., D. Walters, K. Fritz & B. Johnson, 2008. Comparing trophic position of stream fishes using stable isotope and gut contents analyses. Ecology of Freshwater Fish 17: 199–206.

    Article  Google Scholar 

  • Sánchez-Hernández, J. & P. A. Amundsen, 2018. Ecosystem type shapes trophic position and omnivory in fishes. Fish and Fisheries 19: 1003–1015.

    Article  Google Scholar 

  • Stergiou, K. I. & V. S. Karpouzi, 2002. Feeding habits and trophic levels of Mediterranean fish. Reviews in Fish Biology and Fisheries 11: 217–254.

    Article  Google Scholar 

  • Strauss, R. E., 1979. Reliability estimates for Ivlevˈs electivity index, the forage ratio, and a proposed linear index of food selection. Transactions of the American Fisheries Society 108: 344–352.

    Article  Google Scholar 

  • Van Valen, L., 1965. Morphological variation and width of ecological niche. The American naturalist 99: 377–390.

    Article  Google Scholar 

  • Vander Zanden, M. J., J. M. Casselman & J. B. Rasmussen, 1999. Stable isotope evidence for the food web consequences of species invasions in lakes. Nature 401: 464.

    Article  CAS  Google Scholar 

  • Vanderploeg, H. & D. Scavia, 1979. Two electivity indices for feeding with special reference to zooplankton grazing. Journal of the Fisheries Board of Canada 36: 362–365.

    Article  Google Scholar 

  • Wilbur, H. M., D. W. Tinkle & J. P. Collins, 1974. Environmental certainty, trophic level, and resource availability in life history evolution. The American naturalist 108: 805–817.

    Article  Google Scholar 

  • Williams, R. J. & N. D. Martinez, 2004. Limits to trophic levels and omnivory in complex food webs: theory and data. The American naturalist 163: 458–468.

    Article  Google Scholar 

  • Wilman, H., J. Belmaker, J. Simpson, C. de la Rosa, M. M. Rivadeneira & W. Jetz, 2014. EltonTraits 1.0: species-level foraging attributes of the world’s birds and mammals. Ecology 95: 2027.

    Article  Google Scholar 

Download references

Acknowledgements

I would like to thank B. O’Meara, X. Giam, C. Lash, and the López-Fernández lab for their helpful discussions on the construction of the package and the manuscript. I would also like to thank E. Thanou for beta testing the software. Research was supported by the National Science Foundation DEB-1701913 and the Department of Ecology & Evolutionary Biology at the University of Tennessee.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Samuel R. Borstein.

Additional information

Handling editor: Gideon Gal

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Borstein, S.R. dietr: an R package for calculating fractional trophic levels from quantitative and qualitative diet data. Hydrobiologia 847, 4285–4294 (2020). https://doi.org/10.1007/s10750-020-04417-5

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10750-020-04417-5

Keywords

Navigation