Title: | Taxonomic Name Resolution Service |
---|---|
Description: | Provides access to the Taxonomic Name Resolution Service <https://github.com/ojalaquellueva/tnrsapi> through R. The user supplies plant taxonomic names and the package returns resolved taxonomic names along with information on decisions. Optionally, the package can also be used to parse taxonomic names. |
Authors: | Brian Maitner [aut, cre]
|
Maintainer: | Brian Maitner <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.3.6 |
Built: | 2025-02-08 05:08:44 UTC |
Source: | https://github.com/cran/TNRS |
Resolve plant taxonomic names.
TNRS( taxonomic_names, sources = c("wcvp", "wfo"), classification = "wfo", mode = "resolve", matches = "best", accuracy = NULL, skip_internet_check = FALSE, ... )
TNRS( taxonomic_names, sources = c("wcvp", "wfo"), classification = "wfo", mode = "resolve", matches = "best", accuracy = NULL, skip_internet_check = FALSE, ... )
taxonomic_names |
Data.frame containing two columns: 1) Row number, 2) Taxonomic names to be resolved (or parsed). Note that these two columns must be in this order. Alternatively, a character vector of names can be supplied. |
sources |
Character. Taxonomic sources to use. Default is c("wcvp", "wfo"). Options include "wfo", "wcvp", and "cact". Use TNRS_sources() for more information. |
classification |
Character. Family classification to use. Currently options include "wfo" (the default). |
mode |
Character. Options are "resolve" and "parse". Default option is "resolve" |
matches |
Character. Should all matches be returned ("all") or only the best match ("best", the default)? |
accuracy |
numeric. If specified, only matches with a score greater than or equal to the supplied accuracy level will be returned. If left NULL, the default threshold will be used. |
skip_internet_check |
Should the check for internet connectivity be skipped? Default is FALSE. |
... |
Additional parameters passed to internal functions |
Dataframe containing TNRS results.
wfo = World Flora Online, wcvp = World Checklist of Vascular Plants, cact = Cactaceae at Caryophyllales.org.
For queries of more than 5000 names, the function will automatically divide the query into batches of 5000 names and then run the batches one after the other. Thus, for very large queries this may take some time. When this is the case, a progress bar will be displayed.
IMPORTANT: Note that parallelization of queries is automatically handled by the API, and so there is no need to further parallelize in R (in fact, doing so may actually slow things down!).
## Not run: # Take a subset of the testfile to speed up runtime tnrs_testfile <- tnrs_testfile[1:20, ] results <- TNRS(taxonomic_names = tnrs_testfile) # Inspect the results head(results, 10) ## End(Not run)
## Not run: # Take a subset of the testfile to speed up runtime tnrs_testfile <- tnrs_testfile[1:20, ] results <- TNRS(taxonomic_names = tnrs_testfile) # Inspect the results head(results, 10) ## End(Not run)
Resolve a small batch of plant taxonomic names
TNRS_base( taxonomic_names, sources = c("wcvp", "wfo"), classification = "wfo", mode = "resolve", matches = "best", accuracy = NULL, skip_internet_check = FALSE, ... )
TNRS_base( taxonomic_names, sources = c("wcvp", "wfo"), classification = "wfo", mode = "resolve", matches = "best", accuracy = NULL, skip_internet_check = FALSE, ... )
taxonomic_names |
Data.frame containing two columns: 1) Row number, 2) Taxonomic names to be resolved (or parsed). Alternatively, a character vector of names can be supplied. |
sources |
Character. Taxonomic sources to use. Default is c("wcvp", "wfo"). Options include "wfo", and "wcvp". |
classification |
Character. Family classification to use. Currently options include "wfo" (the default). |
mode |
Character. Options are "resolve" and "parse". Default option is "resolve" |
matches |
Character. Should all matches be returned ("all") or only the best match ("best", the default)? |
accuracy |
numeric. If specified, only matches with a score greater than or equal to the supplied accuracy level will be returned. |
skip_internet_check |
Should the check for internet connectivity be skipped? Default is FALSE. |
... |
Additional parameters passed to internal functions |
Dataframe containing TNRS results.
This function is primarily used as an internal function of TNRS and can only handle relatively small batches of names.
usda = United States Department of Agriculture, wfo = World Flora Online, wcvp = World Checklist of Vascular Plants.
Returns information needed to cite the TNRS
TNRS_citations(skip_internet_check = FALSE, ...)
TNRS_citations(skip_internet_check = FALSE, ...)
skip_internet_check |
Should the check for internet connectivity be skipped? Default is FALSE. |
... |
Additional parameters passed to internal functions |
Dataframe containing bibtex-formatted citation information
This function provides citation information in bibtex format that can be used with reference manager software (e.g. Paperpile, Zotero). Please do remember to cite both the sources and the TNRS, as the TNRS couldn't exist without these sources!
{ citation_info <- TNRS_citations() }
{ citation_info <- TNRS_citations() }
Returns metadata on TNRS including version and citation information
TNRS_metadata(bibtex_file = NULL, skip_internet_check = FALSE)
TNRS_metadata(bibtex_file = NULL, skip_internet_check = FALSE)
bibtex_file |
Optional output file for writing bibtex citations. |
skip_internet_check |
Should the check for internet connectivity be skipped? Default is FALSE. |
List containing: (1) bibtex-formatted citation information, (2) information about TNRS data sources, and (3) TNRS version information.
This function provides citation information in bibtex format that can be used with reference manager software (e.g. Paperpile, Zotero). Please remember to cite both the sources and the TNRS, as the TNRS couldn't exist without these sources!
This function is a wrapper that returns the output of the functions TNRS_citations, TNRS_sources, and TNRS_version.
{ metadata <- TNRS_metadata() }
{ metadata <- TNRS_metadata() }
Return metadata about the current TNRS sources
TNRS_sources(skip_internet_check = FALSE, ...)
TNRS_sources(skip_internet_check = FALSE, ...)
skip_internet_check |
Should the check for internet connectivity be skipped? Default is FALSE. |
... |
Additional parameters passed to internal functions |
Dataframe containing information about the sources used in the current TNRS version.
{ sources <- TNRS_sources() }
{ sources <- TNRS_sources() }
Get synonyms for a single species
TNRS_synonyms( taxonomic_name, source = "wcvp", skip_internet_check = FALSE, ... )
TNRS_synonyms( taxonomic_name, source = "wcvp", skip_internet_check = FALSE, ... )
taxonomic_name |
Data.frame containing a single row and two columns: 1) Row number, 2) Taxonomic name to get synonyms of. Alternatively, a single name cane be supplied as a character string. |
source |
Character. A single taxonomic source to use. Default is "wcvp". Options include "wfo", "wcvp", and "cact". |
skip_internet_check |
Should the check for internet connectivity be skipped? Default is FALSE. |
... |
Additional parameters passed to internal functions |
Dataframe containing synonyms and associated data for a single species.
This function only handles a single source and a single taxonomic name at a time. This is by design.
wfo = World Flora Online, wcvp = World Checklist of Vascular Plants, cact = Cactaceae at Caryophyllales.org
{ TNRS_synonyms(taxonomic_name = "Sabal palmetto",source = "wfo") }
{ TNRS_synonyms(taxonomic_name = "Sabal palmetto",source = "wfo") }
A dataset containing scientific names for 100 taxa. Names vary in accuracy and correctness.
tnrs_testfile
tnrs_testfile
A data frame with 100 rows and 2 variables:
Unique integer identifying each row
Scientific name, possibly containing errors
...
https://github.com/ojalaquellueva/TNRSapi
Return metadata about the current TNRS version
TNRS_version(skip_internet_check = FALSE, ...)
TNRS_version(skip_internet_check = FALSE, ...)
skip_internet_check |
Should the check for internet connectivity be skipped? Default is FALSE. |
... |
Additional parameters passed to internal functions |
Dataframe containing current TNRS version number, build date, and code version.
{ TNRS_version_metadata <- TNRS_version() }
{ TNRS_version_metadata <- TNRS_version() }