View source: R/ConvertFishbaseFood.R
ConvertFishbaseFood | R Documentation |
Converts FishBase/SealifBase food item diet data obtained from the diet function into a usable format for dietr
ConvertFishbaseFood(FishBaseFood, ExcludeStage = NULL)
FishBaseFood |
a data frame produced by the rfishbase fooditem function |
ExcludeStage |
a character, indicating which life stages to exclude. Must match stage names given by rfishbase (i.e. larvae, rec./juveniles, juv./adults, adults). |
This converts the data frame produced by rfishbase fooditem function into a usable format for dietr.
a list of length two, with two data frames. One containing the re-formatted food item data and one containing the Taxonomy with species names.
Samuel Borstein
#Get rfishbase food item data for a few species
my.food <- as.data.frame(rfishbase::fooditems(c("Lutjanus apodus","Epinephelus itajara")))
#use the ConvertFishbaseFood function to format it for dietr and exclude recruits/juveniles
cleaned.food <- ConvertFishbaseFood(FishBaseFood=my.food, ExcludeStage=c("larvae","recruits/juv."))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.