Used to store taxon IDs, either arbitrary or from a taxonomy database. This is typically used to store taxon IDs in taxon() objects.

taxon_id(id, database = NULL)

Arguments

id

(character/integer/numeric) a taxonomic id, required

database

(database) database class object, optional

Value

An R6Class object of class TaxonId

See also

Examples

(x <- taxon_id(12345))
#> <TaxonId> 12345 #> database: none
x$id
#> [1] 12345
x$database
#> NULL
(x <- taxon_id( 12345, database_list$ncbi ))
#> <TaxonId> 12345 #> database: ncbi
x$id
#> [1] 12345
x$database
#> <database> ncbi #> url: http://www.ncbi.nlm.nih.gov/taxonomy #> description: NCBI Taxonomy Database #> id regex: .*
# a null taxon_name object taxon_name(NULL)
#> <TaxonName> none #> database: none