trophic_level: A function to find trophic level

View source: R/trophic_level.R

trophic_levelR Documentation

A function to find trophic level

Description

A function to find trophic level of a species on either species or genus level using rfishbase. It returns a data frame containing the trophic level and the level at which the trophic level was found (species or genus).

Usage

trophic_level(sp)

Arguments

sp

A character value containing the species name

Value

Returns a dataframe with species, trophic level, and taxonomy level.

Examples


library(fishflux)
library(dplyr)
trophic_level("Lutjanus griseus")
lapply(c("Chlorurus spilurus","Zebrasoma scopas"), trophic_level) %>%
  bind_rows(.id = ".id")



nschiett/fishflux documentation built on Dec. 14, 2024, 6:26 p.m.