Learn R Programming

taxize (version 0.7.9)

tnrs: Phylotastic Taxonomic Name Resolution Service.

Description

Match taxonomic names using the Taxonomic Name Resolution Service (TNRS). Returns score of the matched name, and whether it was accepted or not.

Usage

tnrs(query = NA, source = NULL, code = NULL, getpost = "POST", sleep = 0, splitby = 30, verbose = TRUE, ...)

Arguments

query
Vector of quoted taxonomic names to search (character).
source
Specify the source you want to match names against. Defaults to just retrieve data from all sources. Options: NCBI, iPlant_TNRS, or MSW3. Only available when using getpost="POST".
code
Nomenclatural code. One of: ICZN (zoological), ICN (algae, fungi, and plants), ICNB (bacteria), ICBN (botanical), ICNCP (cultivated plants), ICTV (viruses). Only available when using getpost="POST".
getpost
Use GET or POST method to send the query. If you have more than say 50 species or so in your query, you should probably use POST. IMPORTANT!!!!! -> POST is the only option for this parameter if you want to use source or code parameters.
sleep
Numer of seconds by which to pause between calls. Defaults to 0 seconds. Use when doing many calls in a for loop ar lapply type call.
splitby
Number by which to split species list for querying the TNRS.
verbose
Verbosity or not (default TRUE)
...
Curl options to pass in GET or POST

Value

data.frame of results from TNRS plus the name submitted.

Details

If there is no match in the Taxosaurus database, nothing is returned, so you will not get anything back for non-matches.

Examples

Run this code
## Not run: 
# mynames <- c("Helianthus annuus", "Poa annua", "Mimulus bicolor")
# tnrs(query = mynames, source = "iPlant_TNRS")
# 
# # Specifying the nomenclatural code to match against
# mynames <- c("Helianthus annuus", "Poa annua")
# tnrs(query = mynames, code = "ICBN")
# 
# # You can specify multiple sources, by comma-separating them
# mynames <- c("Panthera tigris", "Eutamias minimus", "Magnifera indica",
# "Humbert humbert")
# tnrs(query = mynames, source = "NCBI,MSW3")
# 
# mynames <- c("Panthera tigris", "Eutamias minimus", "Magnifera indica",
#    "Humbert humbert", "Helianthus annuus", "Pinus contorta", "Poa annua",
#    "Abies magnifica", "Rosa california", "Festuca arundinace",
#    "Mimulus bicolor", "Sorbus occidentalis","Madia sativa", "Thymopsis thymodes",
#    "Bartlettia scaposa")
# tnrs(mynames, source = "NCBI")
# 
# # Pass on curl options
# library("httr")
# mynames <- c("Helianthus annuus", "Poa annua", "Mimulus bicolor")
# tnrs(query = mynames, source = "iPlant_TNRS", config = verbose())
# ## End(Not run)

Run the code above in your browser using DataLab