Title: | Formatting Taxonomic Names in Markdown |
---|---|
Description: | A collection of functions used to format taxonomic names in Markdown documents. Those functions work with data structured according to Alvarez and Luebert (2018) <doi:10.3897/bdj.6.e23635>. |
Authors: | Miguel Alvarez [aut, cre] |
Maintainer: | Miguel Alvarez <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2024-11-07 05:28:50 UTC |
Source: | https://github.com/kamapu/taxnames |
For convenience and to simplify the call of name formats, the containing object (a taxlist::taxlist object) will be handled internally by all functions.
A standard taxonomic list is already set in this package and can be retrieved or replaced.
The function set_style()
sets the style for the formatted names (default
"markdown"
) and the standard collapse connectors.
set_tax(tax) ## S3 method for class 'taxlist' set_tax(tax) get_tax() set_style(style, collapse, secundum) get_style()
set_tax(tax) ## S3 method for class 'taxlist' set_tax(tax) get_tax() set_style(style, collapse, secundum) get_style()
tax |
A taxlist::taxlist object set as standard taxonomy. |
style |
A character value setting the format style. It is passed to
the homonimous parameter in |
collapse |
A character vector (lenght 1 or 2) setting the collapse
connectors for multiple names. It is passed to the homonimous parameter
in |
secundum |
A character value indicating the name of the colum in slot taxonViews of the internal object, which will be used to indicate the respective taxon view. |
get_tax()
returns an object of class taxlist::taxlist, while
get_style()
returns a list with options set for the session.
## Get the current taxonomy get_tax() ## Get further settings get_style()
## Get the current taxonomy get_tax() ## Get further settings get_style()
Inserting formatted taxonomic names in documents require specific functions for every format, which are provided here.
These functions print only accepted names for the selected taxon concepts.
Suffixes in the function names are explained as follows:
fn: Full name without author name.
fna: Full name with author name.
fnas: Full name with author name and taxon view (secundum).
an: Abbreviated name without author name.
ana: Abbreviated name with author name.
tn_fn(x, ...) tn_fna(x, ...) tn_fnas(x, ...) tn_an(x, ...) tn_ana(x, ...)
tn_fn(x, ...) tn_fna(x, ...) tn_fnas(x, ...) tn_an(x, ...) tn_ana(x, ...)
x |
A vector containing selected identifiers for taxon concepts
(TaxonConceptID) included in the internal taxonomic object
(see |
... |
Further arguments passed to |
All these functions return a character value.
## Compare all these outputs tn_fn(13) tn_fna(13) tn_fnas(13) tn_an(13) tn_ana(13)
## Compare all these outputs tn_fn(13) tn_fna(13) tn_fnas(13) tn_an(13) tn_ana(13)
These functions work similarly to tn_an()
and its alies but the names
are accessed by their TaxonUsageID and work also for synonyms.
Suffixes in the function names are explained as follows:
fun: Full usage name without author name.
funa: Full usage name with author name.
aun: Abbreviated usage name without author name.
auna: Abbreviated usage name with author name.
tn_fun(x, ...) tn_funa(x, ...) tn_aun(x, ...) tn_auna(x, ...)
tn_fun(x, ...) tn_funa(x, ...) tn_aun(x, ...) tn_auna(x, ...)
x |
A vector containing selected identifiers for taxon names
(TaxonUsageID) included in the internal taxonomic object
(see |
... |
Further arguments passed to |
All these functions return a character value.
## Compare all these outputs tn_fun(52613) tn_funa(52613) tn_aun(52613) tn_auna(52613)
## Compare all these outputs tn_fun(52613) tn_funa(52613) tn_aun(52613) tn_auna(52613)
Displaying names of parent taxa.
Suffixes in the function names are explained as follows:
pfn: Parent's full name without author name.
pfna: Parent's full name with author name.
pfnas: Parent's full name with author name and taxon view (secundum).
pan: Parent's abbreviated name without author name.
pana: Parent's abbreviated name with author name.
tn_pfn(x, level, ...) tn_pfna(x, level, ...) tn_pfnas(x, level, ...) tn_pan(x, level, ...) tn_pana(x, level, ...)
tn_pfn(x, level, ...) tn_pfna(x, level, ...) tn_pfnas(x, level, ...) tn_pan(x, level, ...) tn_pana(x, level, ...)
x |
A vector containing selected identifiers for taxon concepts
(TaxonConceptID) included in the internal taxonomic object
(see |
level |
A character value indicating the taxon rank set for parent
taxa. I is passed to |
... |
Further arguments passed to |
All these functions return a character value.
## Compare all these outputs tn_pfn(13, "family") tn_pfna(13, "family") tn_pfnas(13, "family") tn_pan(13, "family") tn_pana(13, "family")
## Compare all these outputs tn_pfn(13, "family") tn_pfna(13, "family") tn_pfnas(13, "family") tn_pan(13, "family") tn_pana(13, "family")