Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

match_names

Inspect and Update alternative matches for a name returned by tnrs_match_names


Description

Taxonomic names may have different meanings in different taxonomic contexts, as the same genus name can be applied to animals and plants for instance. Additionally, the meaning of a taxonomic name may have change throughout its history, and may have referred to a different taxon in the past. In such cases, a given names might have multiple matches in the Open Tree Taxonomy. These functions allow users to inspect (and update) alternative meaning of a given name and its current taxonomic status according to the Open Tree Taxonomy.

Usage

## S3 method for class 'match_names'
inspect(response, row_number, taxon_name, ott_id, ...)

inspect(response, ...)

## S3 method for class 'match_names'
update(object, row_number, taxon_name, ott_id, new_row_number, new_ott_id, ...)

Arguments

response

an object generated by the tnrs_match_names function

row_number

the row number corresponding to the name to inspect

taxon_name

the taxon name corresponding to the name to inspect

ott_id

the ott id corresponding to the name to inspect

...

currently ignored

object

an object created by tnrs_match_names

new_row_number

the row number in the output of inspect to replace the taxa specified by row_number, taxon_name, or ott_id.

new_ott_id

the ott id of the taxon to replace the taxa specified by row_number, taxon_name, or ott_id.

Details

To inspect alternative taxonomic meanings of a given name, you need to provide the object resulting from a call to the tnrs_match_names function, as well as one of either the row number corresponding to the name in this object, the name itself (as used in the original query), or the ott_id listed for this name.

To update one of the name, you also need to provide the row number in which the name to be replaced appear or its ott id.

Value

a data frame

See Also

Examples

## Not run: 
   matched_names <- tnrs_match_names(c("holothuria", "diadema", "boletus"))
   inspect(matched_names, taxon_name="diadema")
   new_matched_names <- update(matched_names, taxon_name="diadema",
                               new_ott_id = 631176)
   new_matched_names
   
## End(Not run)

rotl

Interface to the 'Open Tree of Life' API

v3.0.11
BSD_2_clause + file LICENSE
Authors
Francois Michonneau [aut, cre] (<https://orcid.org/0000-0002-9092-966X>), Joseph Brown [aut] (<https://orcid.org/0000-0002-3835-8062>), David Winter [aut] (<https://orcid.org/0000-0002-6165-0029>), Scott Chamberlain [rev] (<https://orcid.org/0000-0003-1444-9135>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.