tax_id.taxa_classification {taxa} | R Documentation |
Set and get taxon IDs
Description
Set and get the taxon IDs in objects that have them, such as taxon objects.
Usage
## S3 method for class 'taxa_classification'
tax_id(x)
## S3 replacement method for class 'taxa_classification'
tax_id(x) <- value
tax_id(x)
tax_id(x) <- value
## S3 method for class 'taxa_taxon'
tax_id(x)
## S3 replacement method for class 'taxa_taxon'
tax_id(x) <- value
## S3 method for class 'taxa_taxonomy'
tax_id(x)
## S3 replacement method for class 'taxa_taxonomy'
tax_id(x) <- value
Arguments
x |
An object with taxon IDs. |
value |
The taxon IDs to set. Inputs will be coerced into a taxon_id vector. |
Examples
x <- taxon(name = c('Homo sapiens', 'Bacillus', 'Ascomycota', 'Ericaceae'),
rank = c('species', 'genus', 'phylum', 'family'),
id = taxon_id(c('9606', '1386', '4890', '4345'), db = 'ncbi'),
auth = c('Linnaeus, 1758', 'Cohn 1872', NA, 'Juss., 1789'))
tax_id(x)
tax_id(x) <- paste0('00', tax_id(x))
tax_id(x)[1] <- '00000'
[Package taxa version 0.4.3 Index]