rfishbase (version 3.1.5)

ecology: ecology

Description

ecology

Usage

ecology(
  species_list = NULL,
  fields = NULL,
  server = getOption("FISHBASE_API", "fishbase"),
  version = get_latest_release(),
  db = default_db(),
  ...
)

Arguments

species_list

A vector of scientific names (each element as "genus species"). If empty, a table for all fish will be returned.

fields

a character vector specifying which fields (columns) should be returned. By default, all available columns recognized by the parser are returned. Mostly for backwards compatibility as users can subset by column later

server

can be set to either "fishbase" or "sealifebase" to switch between databases. NOTE: it is usually easier to leave this as NULL and set the source instead using the environmental variable `FISHBASE_API`, e.g. `Sys.setenv(FISHBASE_API="sealifebase")`.

version

a version string for the database, will default to the latest release. see [get_releases()] for details.

db

the

...

unused; for backwards compatibility only

Value

a table of species ecology data

Details

By default, will only return one entry (row) per species. Increase limit to get multiple returns for different stocks of the same species, though often data is either identical to the first or simply missing in the additional stocks.

References

http://www.fishbase.org/manual/english/fishbasethe_ecology_table.htm

Examples

Run this code
# NOT RUN {
ecology("Oreochromis niloticus")

## trophic levels and standard errors for a list of species
ecology(c("Oreochromis niloticus", "Salmo trutta"),
        fields=c("SpecCode", "FoodTroph", "FoodSeTroph", "DietTroph", "DietSeTroph"))
# }

Run the code above in your browser using DataCamp Workspace