tax_name.taxa_classification {taxa} | R Documentation |
Set and get taxon names
Description
Set and get the taxon names in objects that have them, such as taxon objects. Note that this is not the same as adding vector names with names.
Usage
## S3 method for class 'taxa_classification'
tax_name(x)
## S3 replacement method for class 'taxa_classification'
tax_name(x) <- value
tax_name(x)
tax_name(x) <- value
## S3 method for class 'taxa_taxon'
tax_name(x)
## S3 replacement method for class 'taxa_taxon'
tax_name(x) <- value
## S3 method for class 'taxa_taxonomy'
tax_name(x)
## S3 replacement method for class 'taxa_taxonomy'
tax_name(x) <- value
Arguments
x |
An object with taxon names. |
value |
The taxon names to set. Inputs will be coerced into a character 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_name(x)
tax_name(x) <- tolower(tax_name(x))
tax_name(x)[1] <- 'Billy'
[Package taxa version 0.4.3 Index]