| sci2comm {taxize} | R Documentation |
Get common names from scientific names.
sci2comm(...) ## Default S3 method: sci2comm(scinames, db = "eol", simplify = TRUE, ...) ## S3 method for class 'uid' sci2comm(id, ...) ## S3 method for class 'tsn' sci2comm(id, simplify = TRUE, ...) ## S3 method for class 'wormsid' sci2comm(id, simplify = TRUE, ...) ## S3 method for class 'iucn' sci2comm(id, simplify = TRUE, ...)
... |
|
scinames |
character; One or more scientific names or partial names. |
db |
character; Data source, one of "eol" (default),
"itis" "ncbi", "worms", or "iucn". Note that
each taxonomic data source has their own identifiers, so that if you
provide the wrong |
simplify |
(logical) If TRUE, simplify output to a vector of names.
If FALSE, return variable formats from different sources, usually a
data.frame. Only applies to eol and itis. Specify |
id |
Note that EOL requires an API key. You can pass in your EOL api
key in the function call like
sci2comm('Helianthus annuus', key="<your eol api key>"). You can
also store your EOL API key in your .Rprofile file as
options(eolApiKey = "<your eol api key>"), or just for the current
session by running options(eolApiKey = "<your eol api key>") in
the console.
Note that IUCN also requires an API key. See
rredlist-package for help on authentiating with
IUCN Redlist
List of character vectors, named by input taxon name, or taxon ID
Scott Chamberlain (myrmecocystus@gmail.com)
## Not run:
sci2comm(scinames='Helianthus annuus', db='eol')
sci2comm(scinames='Helianthus annuus', db='itis')
sci2comm(scinames=c('Helianthus annuus', 'Poa annua'))
sci2comm(scinames='Puma concolor', db='ncbi')
sci2comm('Gadus morhua', db='worms')
sci2comm('Pomatomus saltatrix', db='worms')
sci2comm('Loxodonta africana', db='iucn')
# Passing id in, works for sources: itis and ncbi, not eol
sci2comm(get_tsn('Helianthus annuus'))
sci2comm(get_uid('Helianthus annuus'))
sci2comm(get_wormsid('Gadus morhua'))
sci2comm(get_iucn('Loxodonta africana'))
# Don't simplify returned
sci2comm(get_tsn('Helianthus annuus'), simplify=FALSE)
sci2comm(get_iucn('Loxodonta africana'), simplify=FALSE)
# Use curl options
library("httr")
sci2comm('Helianthus annuus', db="ncbi", config=verbose())
## End(Not run)