View source: R/taxadbToBeeBDC.R
taxadbToBeeBDC | R Documentation |
Uses the taxadb R package to download a requested taxonomy and then transforms it into the input
BeeBDC format. This means that any taxonomy in their databases can be used with BeeBDC. You can
also save the output to your computer and to the R environment for immediate use. See
details below for a list of providers or see taxadb::td_create()
.
taxadbToBeeBDC(
name = NULL,
rank = NULL,
provider = "gbif",
version = "22.12",
collect = TRUE,
ignore_case = TRUE,
db = NULL,
removeEmptyNames = TRUE,
outPath = getwd(),
fileName = NULL
)
name |
Character. Taxonomic scientific name (e.g. "Aves").
As defined by |
rank |
Character. Taxonomic rank name. (e.g. "class").
As defined by |
provider |
Character. From which provider should the hierarchy be returned?
Default is 'gbif', which can also be configured using options(default_taxadb_provide = ...").
See |
version |
Character. Which version of the taxadb provider database should we use? defaults
to latest. See tl_import for details. Default = 22.12.
As defined by |
collect |
Logical. Should we return an in-memory data.frame
(default, usually the most convenient), or a reference to lazy-eval table on disk
(useful for very large tables on which we may first perform subsequent filtering operations.).
Default = TRUE.
As defined by |
ignore_case |
Logical. should we ignore case (capitalization) in matching names?
Can be significantly slower to run. Default = TRUE.
As defined by |
db |
a connection to the taxadb database. See details of |
removeEmptyNames |
Logical. If True (default), it will remove entries without an entry for specificEpithet. |
outPath |
Character. The path to a directory (folder) in which the output should be saved. |
fileName |
Character. The name of the output file, ending in '.csv'. |
Returns a taxonomy file (to the R environment and to the disk, if a fileName is
provided) as a tibble that can be used with BeeBDC::harmoniseR()
.
beesTaxonomy()
for the bee taxonomy and harmoniseR()
for the
taxon-cleaning function where these taxonomies are implemented.
## Not run:
# Run the function using the bee genus Apis as an example...
ApisTaxonomy <- BeeBDC::taxadbToBeeBDC(
name = "Apis",
rank = "Genus",
provider = "gbif",
version = "22.12",
removeEmptyNames = TRUE,
outPath = getwd(),
fileName = NULL
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.