ConvertFishbaseFood {dietr} | R Documentation |
Converts FishBase/SealifBase food item diet data obtained from the diet function into a usable format for dietr
Description
Converts FishBase/SealifBase food item diet data obtained from the diet function into a usable format for dietr
Usage
ConvertFishbaseFood(FishBaseFood, ExcludeStage = NULL)
Arguments
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). |
Details
This converts the data frame produced by rfishbase fooditem function into a usable format for dietr.
Value
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.
Author(s)
Samuel Borstein
Examples
#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."))
[Package dietr version 1.1.4 Index]