Learn R Programming

taxize (version 0.7.9)

synonyms: Retrieve synonyms from various sources given input taxonomic names or identifiers.

Description

Retrieve synonyms from various sources given input taxonomic names or identifiers.

Usage

synonyms(...)
"synonyms"(x, db = NULL, rows = NA, ...)
"synonyms"(id, ...)
"synonyms"(id, ...)
"synonyms"(id, ...)
"synonyms"(id, ...)
"synonyms"(id, ...)

Arguments

...
Other passed arguments to internal functions get_*() and functions to gather synonyms.
x
Vector of taxa names (character) or IDs (character or numeric) to query.
db
character; database to query. either itis, tropicos, col, or nbn. Note that each taxonomic data source has their own identifiers, so that if you provide the wrong db value for the identifier you could get a result, but it will likely be wrong (not what you were expecting).
rows
(numeric) Any number from 1 to infinity. If the default NA, all rows are considered. Note that this parameter is ignored if you pass in a taxonomic id of any of the acceptable classes: tsn, tpsid, nbnid, ids.
id
character; identifiers, returned by get_tsn, get_tpsid, or get_nbnid

Value

A named list of data.frames with the synonyms of every supplied taxa.

Details

If IDs are supplied directly (not from the get_* functions) you must specify the type of ID.

For db = "itis" you can pass in a parameter accepted to toggle whether only accepted names are used accepted = TRUE, or if all are used accepted = FALSE. The default is accepted = FALSE.

See Also

get_tsn, get_tpsid, get_nbnid

Examples

Run this code
## Not run: 
# # Plug in taxon IDs
# synonyms(183327, db="itis")
# synonyms("25509881", db="tropicos")
# synonyms("NBNSYS0000004629", db='nbn')
# synonyms("87e986b0873f648711900866fa8abde7", db='col')
# 
# # Plug in taxon names directly
# synonyms("Pinus contorta", db="itis")
# synonyms("Puma concolor", db="itis")
# synonyms(c("Poa annua",'Pinus contorta','Puma concolor'), db="itis")
# synonyms("Poa annua", db="tropicos")
# synonyms("Pinus contorta", db="tropicos")
# synonyms(c("Poa annua",'Pinus contorta'), db="tropicos")
# synonyms("Pinus sylvestris", db='nbn')
# synonyms("Puma concolor", db='col')
# synonyms("Ursus americanus", db='col')
# synonyms("Amblyomma rotundatum", db='col')
# 
# # not accepted names, with ITIS
# ## looks for whether the name given is an accepted name,
# ## and if not, uses the accepted name to look for synonyms
# synonyms("Acer drummondii", db="itis")
# synonyms("Spinus pinus", db="itis")
# 
# # Use get_* methods
# synonyms(get_tsn("Poa annua"))
# synonyms(get_tpsid("Poa annua"))
# synonyms(get_nbnid("Carcharodon carcharias"))
# synonyms(get_colid("Ornithodoros lagophilus"))
# 
# # Pass many ids from class "ids"
# out <- get_ids(names="Poa annua", db = c('itis','tropicos'))
# synonyms(out)
# 
# # Use the rows parameter to select certain rows
# synonyms("Poa annua", db='tropicos', rows=1)
# synonyms("Poa annua", db='tropicos', rows=1:3)
# synonyms("Pinus sylvestris", db='nbn', rows=1:3)
# synonyms("Amblyomma rotundatum", db='col', rows=2)
# synonyms("Amblyomma rotundatum", db='col', rows=2:3)
# 
# # Use curl options
# synonyms("Poa annua", db='tropicos', rows=1, config=verbose())
# synonyms("Poa annua", db='itis', rows=1, config=verbose())
# synonyms("Poa annua", db='col', rows=1, config=verbose())
# ## End(Not run)

Run the code above in your browser using DataLab