findAphia {icesVocab} | R Documentation |
Find Aphia Code
Description
Look up Aphia code for a given species.
Usage
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
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)
[Package icesVocab version 1.2.0 Index]