Learn R Programming

taxa (version 0.4.3)

tax_auth.taxa_classification: Set and get taxon authorities

Description

Set and get the taxon authorities in objects that have them, such as taxon objects. Note that this sets all the authority information, such as author name, date, and citations. To set or get just one of part of the authorities, use tax_author, tax_date, or tax_cite instead.

Usage

# S3 method for taxa_classification
tax_auth(x)

# S3 method for taxa_classification tax_auth(x) <- value

tax_auth(x)

tax_auth(x) <- value

# S3 method for taxa_taxon tax_auth(x)

# S3 method for taxa_taxon tax_auth(x) <- value

# S3 method for taxa_taxonomy tax_auth(x)

# S3 method for taxa_taxonomy tax_auth(x) <- value

Arguments

x

An object with taxon authorities.

value

The taxon IDs to set. Inputs will be coerced into a taxon_id vector.

Examples

Run this code
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_auth(x)
tax_auth(x) <- tolower(tax_auth(x))
tax_auth(x)[1] <- 'Billy'

Run the code above in your browser using DataLab