taxon_authority: Taxon authority class

Description Usage Arguments Value See Also Examples

View source: R/taxon_authority.R

Description

\Sexpr[results=rd, stage=render]{taxa2:::lifecycle("maturing")}

Used to store information on taxon authorities, such as author names, date, and citation.

Usage

1
2
3
4
5
6
7
taxon_authority(
  author = character(),
  date = NA,
  citation = NA,
  .names = NA,
  extract_date = TRUE
)

Arguments

author

Zero or more author names.

date

Zero or more dates.

citation

Zero or more literature citations.

.names

The names of the vector.

extract_date

If TRUE (the default), then if a date is detected in the author input and no date input is given, then the date is separated from the author input.

Value

An S3 object of class taxa_taxon_authority

See Also

Other classes: taxon_db(), taxon_id(), taxon_rank(), taxonomy(), taxon()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Making new objects
x <- taxon_authority(c('A', 'B', 'C'))
x <- taxon_authority(c('Cham. & Schldl.', 'L.'),
                     date = c('1827', '1753'))

# Manipulating objects
as.character(x)
x[2]
x[2] <- 'ABC'
names(x) <- c('a', 'b')
x['b'] <- 'David Bowie'
tax_author(x)[1] <- tolower(tax_author(x)[1])
tax_author(x)
tax_date(x) <- c('2000', '1234')
tax_date(x)
tax_cite(x)[2] <- c('Linnaeus, C. (1771). Mantissa plantarum altera generum.')
tax_cite(x)

# Using as columns in tables
tibble::tibble(x = x, y = 1:2)
data.frame(x = x, y = 1:2)

# Converting to tables
tibble::as_tibble(x)
as_data_frame(x)

zachary-foster/taxa2 documentation built on Jan. 1, 2021, 1:48 p.m.