Skip to contents

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

Usage

# 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

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.

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.

Examples

if (FALSE) { # \dontrun{
  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")
} # }