0% found this document useful (0 votes)
12 views44 pages

Rfishbase

The 'rfishbase' package provides a programmatic interface to 'FishBase', allowing access to data on over 30,000 fish species and their biological information through a 'RESTful' API. It also offers experimental access to 'SeaLifeBase', which includes nearly 200,000 records of various aquatic life. The package is maintained by a team of authors and is available on CRAN with version 5.0.1 as of January 12, 2025.

Uploaded by

Cristian Pucci
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views44 pages

Rfishbase

The 'rfishbase' package provides a programmatic interface to 'FishBase', allowing access to data on over 30,000 fish species and their biological information through a 'RESTful' API. It also offers experimental access to 'SeaLifeBase', which includes nearly 200,000 records of various aquatic life. The package is maintained by a team of authors and is available on CRAN with version 5.0.1 as of January 12, 2025.

Uploaded by

Cristian Pucci
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

Package ‘rfishbase’

January 12, 2025


Title R Interface to 'FishBase'
Description A programmatic interface to 'FishBase', re-written
based on an accompanying 'RESTful' API. Access tables describing over 30,000
species of fish, their biology, ecology, morphology, and more. This package also
supports experimental access to 'SeaLifeBase' data, which contains
nearly 200,000 species records for all types of aquatic life not covered by
'FishBase.'
Version 5.0.1
Encoding UTF-8
License CC0

URL https://docs.ropensci.org/rfishbase/,
https://github.com/ropensci/rfishbase

BugReports https://github.com/ropensci/rfishbase/issues
Depends R (>= 4.0)
Imports glue, stringr, purrr, httr, jsonlite, dplyr, duckdbfs (>=
0.0.9), rlang, magrittr, memoise
Suggests testthat, rmarkdown, knitr, covr, spelling, curl
RoxygenNote 7.3.1
Language en-US
NeedsCompilation no
Author Carl Boettiger [cre, aut] (<https://orcid.org/0000-0002-1642-628X>),
Scott Chamberlain [aut] (<https://orcid.org/0000-0003-1444-9135>),
Duncan Temple Lang [aut],
Peter Wainwright [aut],
Kevin Cazelles [ctb] (<https://orcid.org/0000-0001-6619-9874>),
Guohuan Su [ctb] (<https://orcid.org/0000-0003-0091-9773>)
Maintainer Carl Boettiger <cboettig@gmail.com>
Repository CRAN
Date/Publication 2025-01-12 12:10:05 UTC

1
2 Contents

Contents
available_releases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
brains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
common_names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
common_to_sci . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
country . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
countrysub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
countrysubref . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
c_code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
diet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
diet_items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
ecology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
ecosystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
estimate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
faoareas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
fb_tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
fb_tbl . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
fecundity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
fishbase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
fooditems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
genetics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
introductions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
larvae . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
length_freq . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
length_length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
length_weight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
load_taxa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
maturity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
morphology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
morphometrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
oxygen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
popchar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
popgrowth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
popqb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
predators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
ration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
reproduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
sealifebase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
spawning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
species . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
species_by_ecosystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
species_names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
stocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
swimming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
synonyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
available_releases 3

validate_names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Index 44

available_releases List available releases

Description

List available releases

Usage

available_releases(server = c("fishbase", "sealifebase"))

Arguments

server fishbase or sealifebase

Examples
available_releases()

brains brains

Description

brains

Usage

brains(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)
4 common_names

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of species brains

Examples
## Not run:
brains("Oreochromis niloticus")

## End(Not run)

common_names common names

Description
Return a table of common names

Usage
common_names(
species_list = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
Language = "English",
fields = NULL
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
Language a string specifying the language for the common name, e.g. "English"
fields subset to these columns. (recommend to omit this and handle manually)
common_to_sci 5

Details
Note that there are many common names for a given sci name

Value
a data.frame of common names by species queried. If multiple species are queried, The resulting
data.frames are concatenated.

Examples
common_names("Bolbometopon muricatum")

common_to_sci common_to_sci

Description
Return a list of scientific names corresponding to given the common name(s).

Usage
common_to_sci(
x,
Language = "English",
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL
)

Arguments
x a common name or list of common names
Language a string specifying the language for the common name, e.g. "English"
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.

Details
If more than one scientific name matches the common name (e.g. "trout"), the function will simply
return a list of all matching scientific names. If given more than one common name, the resulting
strings of matching scientific names are simply concatenated.

Value
a character vector of scientific names
6 country

See Also
synonyms

Examples

common_to_sci(c("Bicolor cleaner wrasse", "humphead parrotfish"), Language="English")


common_to_sci(c("Coho Salmon", "trout"))

country country

Description
return a table of country for the requested species, as reported in FishBASE.org

Usage
country(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Examples
## Not run:
country("Bolbometopon muricatum")

## End(Not run)
countrysub 7

countrysub countrysub

Description
return a table of countrysub for the requested species

Usage
countrysub(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Examples
## Not run:
countrysub(species_list(Genus='Labroides'))

## End(Not run)

countrysubref countrysubref

Description
return a table of countrysubref
8 c_code

Usage
countrysubref(
server = getOption("FISHBASE_API", "fishbase"),
version = get_latest_release(),
db = default_db(),
...
)

Arguments
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Examples
## Not run:
countrysubref()

## End(Not run)

c_code c_code

Description
return a table of country information for the requested c_code, as reported in FishBASE.org

Usage
c_code(
c_code = NULL,
server = getOption("FISHBASE_API", "fishbase"),
version = get_latest_release(),
db = default_db(),
...
)

Arguments
c_code a C_Code or list of C_Codes (FishBase country code)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored
diet 9

Examples
c_code(440)

diet diet

Description
diet

Usage
diet(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of species diet

References
http://www.fishbase.org/manual/english/fishbasethe_diet_table.htm

Examples
## Not run:
diet()

## End(Not run)
10 ecology

diet_items diet_items

Description
diet_items

Usage
diet_items(...)

Arguments
... additional arguments (not used)

Value
a table of diet_items

Examples
## Not run:
diet_items()

## End(Not run)

ecology ecology

Description
ecology

Usage
ecology(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)
ecosystem 11

Arguments

species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

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

## 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)

ecosystem ecosystem

Description

ecosystem
12 estimate

Usage
ecosystem(
species_list = NULL,
fields = NULL,
server = getOption("FISHBASE_API", "fishbase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of species ecosystems data

Examples
## Not run:
ecosystem("Oreochromis niloticus")

## End(Not run)

estimate estimate

Description
estimate

Usage
estimate(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
faoareas 13

db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of estimates from some models on trophic levels

References
http://www.fishbase.us/manual/English/FishbaseThe_FOOD_ITEMS_table.htm

Examples
## Not run:
estimate("Oreochromis niloticus")

## End(Not run)

faoareas faoareas

Description
return a table of species locations as reported in FishBASE.org FAO location data

Usage
faoareas(
species_list = NULL,
fields = NULL,
server = getOption("FISHBASE_API", "fishbase"),
version = "latest",
db = NULL,
...
)
14 fb_tables

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a tibble, empty tibble if no results found

Examples
faoareas()

fb_tables List the tables available on fishbase/sealifebase

Description
These table names can be used to access each of the corresponding tables using [fb_tbl()]. Please
note that following RDB design, it is often necessary to join multiple tables. Other data cleaning
steps are sometimes necessary as well.

Usage
fb_tables(server = c("fishbase", "sealifebase"), version = "latest")

Arguments
server Access data from fishbase or sealifebase?
version Version, see available_releases()

Examples
fb_tables()
fb_tbl 15

fb_tbl Access a fishbase or sealifebase table

Description

Please note that rfishbase accesses static snapshots of the raw database tables used by FishBase and
Sealifebase websites. Because these are static snapshots, they may lag behind the latest available
information on the web interface, but should provide stable results.

Usage

fb_tbl(
tbl,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
collect = TRUE
)

Arguments

tbl table name, as it appears in the database. See fb_tables() for a list.
server Access data from fishbase or sealifebase?
version Version, see available_releases()
db database connection, deprecated
collect should we return an in-memory table? Generally best to leave as TRUE unless
RAM is too limited. A remote table can be used with most dplyr functions (filter,
select, joins, etc) to further refine.

Details

Please also note that the website pages are not organized precisely along the lines of these tables.
A given page for a species may draw on data from multiple tables, and sometimes presents the data
in a processed or summarized form. Following RDB design, it is often necessary to join multiple
tables. Other data cleaning steps are sometimes necessary as well.

Examples
fb_tbl("species")
16 fecundity

fecundity fecundity

Description

fecundity

Usage

fecundity(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments

species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value

a table of species fecundity

Examples
## Not run:
fecundity("Oreochromis niloticus")

## End(Not run)
fishbase 17

fishbase A table of all the the species found in FishBase, including taxonomic
classification and the Species Code (SpecCode) by which the species
is identified in FishBase.

Description
A table of all the the species found in FishBase, including taxonomic classification and the Species
Code (SpecCode) by which the species is identified in FishBase.

Author(s)
Carl Boettiger <carl@ropensci.org>

fooditems fooditems

Description
fooditems

Usage
fooditems(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of species fooditems
18 genetics

References

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

Examples
## Not run:
fooditems("Oreochromis niloticus")

## End(Not run)

genetics genetics

Description

genetics

Usage

genetics(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments

species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value

a table of species genetics data


introductions 19

Examples
## Not run:
genetics("Oreochromis niloticus")
genetics("Labroides dimidiatus")

## End(Not run)

introductions introductions

Description
introductions

Usage
introductions(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of species introductions data

Examples
## Not run:
introductions("Oreochromis niloticus")

## End(Not run)
20 larvae

larvae larvae

Description

larvae

Usage

larvae(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments

species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value

a table of larval data

Examples
## Not run:
larvae("Oreochromis niloticus")

## End(Not run)
length_freq 21

length_freq length_freq

Description
return a table of species fooditems

Usage
length_freq(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of length_freq information by species; see details

References
http://www.fishbase.org/manual/english/lengthfrequency.htm

Examples
## Not run:
length_freq("Oreochromis niloticus")

## End(Not run)
22 length_length

length_length length_length

Description
return a table of lengths

Usage
length_length(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Details
This table contains relationships for the conversion of one length type to another for over 8,000
species of fish, derived from different publications, e.g. Moutopoulos and Stergiou (2002) and
Gaygusuz et al (2006), or from fish pictures, e.g. Collette and Nauen (1983), Compagno (1984)
and Randall (1997). The relationships, which always refer to centimeters, may consist either of a
regression linking two length types, of the form: Length type (2) = a + b x Length type (1) Length
type (2) = b’ x Length type (1) The available length types are, as elsewhere in FishBase, TL =
total length; FL = fork length; SL = standard length; WD = width (in rays); OT = other type (to
be specified in the Comment field). When a version of equation (1) is presented, the length range,
the number of fish used in the regression, the sex and the correlation coefficient are presented, if
available. When a version of equation (2) is presented, the range and the correlation coefficient are
omitted, as the ratio in (2) will usually be estimated from a single specimen, or a few fish covering
a narrow range of lengths.

Value
a table of lengths
length_weight 23

References

http://www.fishbase.org/manual/english/PDF/FB_Book_CBinohlan_Length-Length_RF_JG.pdf

Examples

## Not run:
length_length("Oreochromis niloticus")

## End(Not run)

length_weight length_weight

Description

The LENGTH-WEIGHT table presents the a and b values of over 5,000 length-weight relationships
of the form W = a x Lb, pertaining to about over 2,000 fish species.

Usage

length_weight(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments

species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored
24 load_taxa

Details

See references for official documentation. From FishBase.org: Length-weight relationships are
important in fisheries science, notably to raise length-frequency samples to total catch, or to estimate
biomass from underwater length observations. The units of length and weight in FishBase are
centimeter and gram, respectively. Thus when length-weight relationships are not in cm-g, the
intercept ’a’ is transformed as follows:
a’(cm, g) = a (mm, g)*10^b a’(cm, g) = a (cm, kg)*1000 a’(cm, g) = a (mm, mg)*10^b/1000 a’(cm,
g) = a (mm, kg)10^b1000
However, published length-weight relationships are sometimes difficult to use, as they may be based
on a length measurement type (e.g., fork length) different from ones length measurements (ex-
pressed e.g., as total length). Therefore, to facilitate conversion between length types, an additional
LENGTH-LENGTH table, #’ presented below, was devised which presents linear regressions or ra-
tios linking length types (e.g., FL vs. TL). We included a calculated field with the weight of a 10 cm
fish (which should be in the order of 10 g for normal, fusiform shaped fish), to allow identification
of gross errors, given knowledge of the body form of a species.

Value

a table of length_weight information by species; see details

References

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

Examples
## Not run:
length_weight("Oreochromis niloticus")

## End(Not run)

load_taxa load_taxa

Description

Show scientific classification of taxa Note: species_names() is an alias for load taxa.

Usage

load_taxa(server = c("fishbase", "sealifebase"), version = "latest", ...)


maturity 25

Arguments
server Either "fishbase" (the default) or "sealifebase"
version the version of the database you want. Will default to the latest available; see
available_releases().
... for compatibility with previous versions

Value
the taxa list

maturity maturity

Description
maturity

Usage
maturity(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of species maturity
26 morphology

Examples
## Not run:
maturity("Oreochromis niloticus")

## End(Not run)

morphology morphology

Description
morphology

Usage
morphology(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of species morphology data

Examples
## Not run:
morphology("Oreochromis niloticus")

## End(Not run)
morphometrics 27

morphometrics morphometrics

Description

morphometrics

Usage

morphometrics(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments

species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value

a table of species morphometrics data

Examples
## Not run:
morphometrics("Oreochromis niloticus")

## End(Not run)
28 oxygen

oxygen oxygen

Description

oxygen

Usage

oxygen(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments

species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value

a table of species oxygen data

Examples
## Not run:
oxygen("Oreochromis niloticus")

## End(Not run)
popchar 29

popchar popchar

Description
Table of maximum length (Lmax), weight (Wmax) and age (tmax)

Usage
popchar(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Details
See references for official documentation. From FishBase.org: This table presents information on
maximum length (Lmax), weight (Wmax) and age (tmax) from various localities where a species
occurs. The largest values from this table are also entered in the SPECIES table. The POPCHAR
table also indicates whether the Lmax, Wmax and tmax values or various combinations thereof refer
to the same individual fish.

References
http://www.fishbase.org/manual/english/fishbasethe_popchar_table.htm

Examples
## Not run:
popchar("Oreochromis niloticus")

## End(Not run)
30 popgrowth

popgrowth popgrowth

Description
This table contains information on growth, natural mortality and length at first maturity, which serve
as inputs to many fish stock assessment models. The data can also be used to generate empirical
relationships between growth parameters or natural mortality estimates, and their correlates (e.g.,
body shape, temperature, etc.), a line of research that is useful both for stock assessment and for
increasing understanding of the evolution of life-history strategies

Usage
popgrowth(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of population growth information by species; see details

References
http://www.fishbase.org/manual/english/fishbasethe_popgrowth_table.htm

Examples
## Not run:
popgrowth("Oreochromis niloticus")

## End(Not run)
popqb 31

popqb popqb

Description
popqb

Usage
popqb(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of species popqb

References
http://www.fishbase.org/manual/english/fishbasethe_popqb_table.htm

Examples
## Not run:
popqb("Oreochromis niloticus")

## End(Not run)
32 predators

predators predators

Description
predators

Usage
predators(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of predators

References
http://www.fishbase.org/manual/english/fishbasethe_predators_table.htm

Examples
## Not run:
predators("Oreochromis niloticus")

## End(Not run)
ration 33

ration ration

Description
ration

Usage
ration(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of species ration

References
http://www.fishbase.org/manual/english/fishbasethe_ration_table.htm

Examples
## Not run:
ration("Oreochromis niloticus")

## End(Not run)
34 references

references references

Description

references

Usage

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

Arguments

codes One or more Fishbase reference numbers, matching the RefNo field
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value

a tibble (data.frame) of reference data

Examples
## Not run:
references(codes = 1)
references(codes = 1:6)
references(codes = 1:6, fields = c('Author', 'Year', 'Title'))
references() # all references

## End(Not run)
reproduction 35

reproduction reproduction

Description

reproduction

Usage

reproduction(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments

species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value

a table of species reproduction

Examples
## Not run:
reproduction("Oreochromis niloticus")

## End(Not run)
36 spawning

sealifebase A table of all the the species found in SeaLifeBase, including taxo-
nomic classification and the Species Code (SpecCode) by which the
species is identified in SeaLifeBase

Description
A table of all the the species found in SeaLifeBase, including taxonomic classification and the
Species Code (SpecCode) by which the species is identified in SeaLifeBase

Author(s)
Carl Boettiger <carl@ropensci.org>

spawning spawning

Description
spawning

Usage
spawning(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of species spawning
species 37

Examples
## Not run:
spawning("Oreochromis niloticus")

## End(Not run)

species species

Description
Provide wrapper to work with species lists.

Usage
species(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Details
The Species table is the heart of FishBase. This function provides a convenient way to query, tidy,
and assemble data from that table given an entire list of species. For details, see: http://www.fishbase.org/manual/english/fishb
Species scientific names are defined according to fishbase taxonomy and nomenclature.

Value
a data.frame with rows for species and columns for the fields returned by the query (FishBase
’species’ table)
38 species_by_ecosystem

Examples
## Not run:

species(c("Labroides bicolor", "Bolbometopon muricatum"))

## End(Not run)

species_by_ecosystem Species list by ecosystem

Description
Species list by ecosystem

Usage
species_by_ecosystem(
ecosystem,
species_list = NULL,
server = getOption("FISHBASE_API", "fishbase"),
version = "latest",
db = NULL,
...
)

Arguments
ecosystem (character) an ecosystem name
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of species ecosystems data

Examples
## Not run:
species_by_ecosystem(ecosystem = "Arctic", server = "sealifebase")

## End(Not run)
species_names 39

species_names species_names

Description

Show scientific classification of taxa Note: species_names() is an alias for load_taxa().

Usage

species_names(server = c("fishbase", "sealifebase"), version = "latest", ...)

Arguments

server Either "fishbase" (the default) or "sealifebase"


version the version of the database you want. Will default to the latest available; see
available_releases().
... for compatibility with previous versions

Value

the taxa list

speed speed

Description

speed

Usage

speed(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)
40 stocks

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of species speed data

Examples
## Not run:
speed("Oreochromis niloticus")

## End(Not run)

stocks stocks

Description
stocks

Usage
stocks(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
swimming 41

version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of species stocks data

Examples
## Not run:
stocks("Oreochromis niloticus")

## End(Not run)

swimming swimming

Description
swimming

Usage
swimming(
species_list = NULL,
fields = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
fields subset to these columns. (recommend to omit this and handle manually)
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a table of species swimming data
42 synonyms

Examples
## Not run:
swimming("Oreochromis niloticus")

## End(Not run)

synonyms synonyms

Description
Check for alternate versions of a scientific name

Usage
synonyms(
species_list = NULL,
server = c("fishbase", "sealifebase"),
version = "latest",
db = NULL,
...
)

Arguments
species_list A vector of scientific names (each element as "genus species"). If empty, a table
for all fish will be returned.
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Details
For further information on fields returned, see: http://www.fishbase.org/manual/english/fishbasethe_synonyms_table.htm

Value
A table with information about the synonym. Will generally be only a single row if a species name
is given. If a FishBase SpecCode is given, all synonyms matching that SpecCode are shown, and
the table indicates which one is Valid for FishBase. This may or may not match the valid name for
Catalog of Life (Col), also shown in the table. See examples for details.
validate_names 43

validate_names validate_names

Description
Check for alternate versions of a scientific name and return the scientific names FishBase recognizes
as valid

Usage
validate_names(
species_list,
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.
server Either "fishbase" or "sealifebase".
version a version string for the database. See available_releases() for details.
db database connection, now deprecated.
... additional arguments, currently ignored

Value
a string of the validated names

Examples

validate_names("Abramites ternetzi")
Index

∗ data morphology, 26
fishbase, 17 morphometrics, 27
sealifebase, 36
oxygen, 28
available_releases, 3
available_releases(), 4–9, 11–23, 25–43 popchar, 29
popgrowth, 30
brains, 3 poplf (length_freq), 21
popll (length_length), 22
c_code, 8 poplw (length_weight), 23
common_names, 4 popqb, 31
common_to_sci, 5 predators, 32
country, 6
countrysub, 7 ration, 33
countrysubref, 7 references, 34
reproduction, 35
diet, 9
diet_items, 10 sci_to_common (common_names), 4
sealifebase, 36
ecology, 10 spawning, 36
ecosystem, 11 species, 37
estimate, 12 species_by_ecosystem, 38
faoareas, 13 species_names, 39
fb_tables, 14 speed, 39
fb_tables(), 15 stocks, 40
fb_tbl, 15 swimming, 41
fecundity, 16 synonyms, 6, 42
fishbase, 17
validate_names, 43
fooditems, 17

genetics, 18

introductions, 19

larvae, 20
length_freq, 21
length_length, 22
length_weight, 23
load_taxa, 24

maturity, 25

44

You might also like