ecology: ecology

Description Usage Arguments Details Value References Examples

View source: R/trophic_ecology.R

Description

ecology

Usage

1
2
ecology(species_list = NULL, fields = NULL, query = NULL, limit = 1,
  server = getOption("FISHBASE_API", FISHBASE_API))

Arguments

species_list

A vector of scientific names (each element as "genus species"). If empty, the table will be loaded up to the limit. This makes it possible to load an entire table without knowledge of the species in the table, thus avoiding uneccesary API calls.

fields

a character vector specifying which fields (columns) should be returned. By default, all available columns recognized by the parser are returned. This option can be used to limit the amount of data transfered over the network if only certain columns are needed.

query

a named list specifying specific subsets of fields.

limit

The maximum number of matches from a single API call (e.g. per species). Function will warn if this needs to be increased, otherwise can be left as is.

server

base URL to the FishBase API (by default). For SeaLifeBase, use https://fishbase.ropensci.org/sealifebase

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.

Value

a table of species ecology data

References

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

Examples

1
2
3
4
5
6
7
8
## 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"))

## End(Not run)

rfishbase documentation built on May 19, 2017, 11:02 a.m.

Search within the rfishbase package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.