common_to_sci: common_to_sci

Description Usage Arguments Details Value See Also Examples

View source: R/common_names.R

Description

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

Usage

1
2
3
4
5
6
7
common_to_sci(
  x,
  Language = "English",
  server = getOption("FISHBASE_API", "fishbase"),
  version = get_latest_release(),
  db = default_db()
)

Arguments

x

a common name or list of common names

Language

a string specifying the language for the common name, e.g. "English"

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

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

See Also

species_list, synonyms

Examples

1
2
common_to_sci(c("Bicolor cleaner wrasse", "humphead parrotfish"), Language="English")
common_to_sci(c("Coho Salmon", "trout"))

rfishbase documentation built on Dec. 14, 2021, 5:07 p.m.