findAphia: Find Aphia Code

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Look up Aphia code for a given species.

Usage

1
findAphia(species, latin = FALSE, regex = FALSE, full = FALSE)

Arguments

species

the species name, either in English (default) or Latin.

latin

whether the species name is in Latin.

regex

whether to match the species name as a regular expression.

full

whether to return a data frame with all species columns.

Details

Species name matches are case-insensitive.

Value

A vector of Aphia codes (default) or a data frame if full is TRUE.

Author(s)

Arni Magnusson.

See Also

getCodeList can be used to get all Aphia codes; see example on that help page.

icesVocab-package gives an overview of the package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
findAphia("cod")
## Not run: 
findAphia("cod")
findAphia("Gadus morhua", latin = TRUE)

# Multiple matches
findAphia(c("cod", "haddock", "saithe"))

# Regular expressions
findAphia("ray", regex = TRUE, full = TRUE)
findAphia("Sebastes", latin = TRUE, regex = TRUE, full = TRUE)

## End(Not run)

ices-tools-prod/icesVocab documentation built on May 18, 2019, 1:31 a.m.