Template for a taxonomic check-list generated from taxlist objects.
The most important functions called in the source code are print_name()
,
indented_list()
, write_rmd()
, and render_rmd()
.
Usage
checklist(object, ...)
# S3 method for taxlist
checklist(
object,
exclude,
indent = " ",
prefix = "",
suffix = "",
print_args = list(),
rmd_args = list(`header-includes` = "- \\setlength{\\parskip}{0pt}"),
render_args = list(),
title = "Taxonomic Checklist",
output = "pdf_document",
output_file = tempfile(),
...
)
Arguments
- object
A taxlist object used as main input.
- ...
Further arguments. In taxlist-method they will be passed to the function
indented_list()
.- exclude
A character vector including the name of taxonomic ranks that will be excluded of formatting in italics (excluded in the call to
print_name()
).- indent
A character value indicating the single indentation, which will be multiplied by the taxonomic rank going from the top to the bottom. Indentation can be either cancellec by
indent = ""
or can be specified for determined taxonomic ranks by naming elements of the input vector after the ranks.- prefix
A character value or character vector named by taxonomic ranks, which will be used as prefix.
- suffix
The same as
prefix
but it will be placed at the end of the line.- print_args
A list with elements named after parameters (arguents) of the function
print_name()
.- rmd_args
A list with elements named after parameters (arguments) of the function
write_rmd()
.- render_args
A list with elements named after parameters (arguments) of the function
render_rmd()
.- title
A character value with the title of the document.
- output
A character value indicating the format of ouput using rmarkdown.
- output_file
Name of the rendered otuput file. It will be passed to
write_rmd()
.
Examples
if (FALSE) {
library(taxlist)
## Subset of family Piperaceae
Piperaceae <- subset(Easplist, TaxonName == "Piperaceae",
slot = "taxonNames", keep_children = TRUE, keep_parents = TRUE
)
## Simple checklist
checklist(Piperaceae, output_file = "piperaceae", exclude = "family")
## Families as sections in document
checklist(Piperaceae,
output_file = "piperaceae2", exclude = "family",
prefix = c(family = "# ")
)
## Families as sections and small captions for the whole taxonomic list
checklist(Easplist,
output_file = "ea-splist", exclude = "family",
prefix = c(family = "# \\sc{"), suffix = c(family = "}")
)
}