Learn R Programming

metacoder (version 0.3.7)

taxon_name: Taxon name class

Description

Used to store the name of taxa. This is typically used to store where taxon names in [taxon()] objects.

Usage

taxon_name(name, database = NULL)

Value

An `R6Class` object of class `TaxonName`

Arguments

name

(character) a taxonomic name. required

database

(character) database class object, optional

See Also

Other classes: hierarchies(), hierarchy(), taxa(), taxmap(), taxon(), taxon_database(), taxon_id(), taxon_rank(), taxonomy()

Examples

Run this code
(poa <- taxon_name("Poa"))
(undef <- taxon_name("undefined"))
(sp1 <- taxon_name("species 1"))
(poa_annua <- taxon_name("Poa annua"))
(x <- taxon_name("Poa annua L."))

x$name
x$database

(x <- taxon_name(
  "Poa annua",
  database_list$ncbi
))
x$rank
x$database

# a null taxon_name object
taxon_name(NULL)

Run the code above in your browser using DataLab