taxize (version 0.9.91)

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, messages = 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

Number 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.

messages

Verbosity or not (default TRUE)

...

Curl options to pass in crul::verb-GET or crul::verb-POST

Value

data.frame of results from TNRS plus the name submitted, with rows in order of user supplied names, though those with no matches are dropped

Details

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

TNRS doesn't provide any advice about the occurrence of homonyms when queries have no indication of a taxonomic name's authority. So if there is any chance of a homonym, you probably want to send the authority as well, or use gnr_resolve(). For example, tnrs(query="Jussiaea linearis", source="iPlant_TNRS") gives result of Jussiaea linearis (Willd.) Oliv. ex Kuntze, but there is a homonym. If you do tnrs(query="Jussiaea linearis Hochst.", source="iPlant_TNRS") you get a direct match for that name. So, beware that there's no indication of homonyms.

References

http://taxosaurus.org/

See Also

gnr_resolve()

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
mynames <- c("Helianthus annuus", "Poa annua", "Mimulus bicolor")
tnrs(query = mynames, source = "iPlant_TNRS", verbose = TRUE)
# }

Run the code above in your browser using DataCamp Workspace