match_names-methods: 'ott_id' and 'flags' for taxonomic names matched by...

Description Usage Arguments Details Value Examples

Description

rotl provides a collection of functions that allows users to extract relevant information from an object generated by tnrs_match_names function.

Usage

1
2
3
4
5
6
7
## S3 method for class 'match_names'
ott_id(tax, row_number, taxon_name, ott_id, ...)

## S3 method for class 'match_names'
flags(tax, row_number, taxon_name, ott_id, ...)

flags(tax, ...)

Arguments

tax

an object returned by tnrs_match_names

row_number

the row number corresponding to the name for which to list the synonyms

taxon_name

the taxon name corresponding to the name for which to list the synonyms

ott_id

the ott id corresponding to the name for which to list the synonyms

...

currently ignored

Details

These methods optionally accept one of the arguments row_number, taxon_name or ott_id to retrieve the corresponding information for one of the matches in the object returned by the tnrs_match_names function.

If these arguments are not provided, these methods can return information for the matches currently listed in the object returned by tnrs_match_names.

Value

A list of the ott ids or flags for the taxonomic names matched with tnrs_match_names, for either one or all the names.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
  rsp <- tnrs_match_names(c("Diadema", "Tyrannosaurus"))
  rsp$ott_id    # ott id for match currently in use
  ott_id(rsp)   # similar as above but elements are named

  ## flags() is useful for instance to determine if a taxon is extinct
  flags(rsp, taxon_name="Tyrannosaurus")

## End(Not run)

rotl documentation built on Oct. 23, 2020, 8:22 p.m.