update_taxonomy {APCalign} | R Documentation |
Update to currently accepted APC name and add APC/APNI name metadata
Description
For a list of taxon names aligned to the APC, update the name to an accepted taxon concept per the APC and add scientific name and taxon concept metadata to names aligned to either the APC or APNI.
Usage
update_taxonomy(
aligned_data,
taxonomic_splits = "most_likely_species",
quiet = TRUE,
output = NULL,
resources = load_taxonomic_resources()
)
Arguments
aligned_data |
A tibble of plant names to update. This table must
include 5 columns, original_name, aligned_name, taxon_rank,
taxonomic_dataset, and aligned_reason.
These columns are created by the function |
taxonomic_splits |
Variable that determines what protocol to use to update taxon names that are ambiguous due to taxonomic splits. The three options are:
|
quiet |
Logical to indicate whether to display messages while updating taxa. |
output |
(optional) Name of the file where results are saved. The default is NULL and no file is created. If specified, the output will be saved in a CSV file with the given name. |
resources |
the taxonomic resources required to make the summary statistics. Loading this can be slow, so call load_taxonomic_resources separately to greatly speed this function up and pass the resources in. |
Details
This function uses the APC to update the taxonomy of names aligned to a taxon concept listed in the APC to the currently accepted name for the taxon concept.
The aligned_data data frame that is input must contain 5 columns,
original_name
,aligned_name
,taxon_rank
,taxonomic_dataset
, andaligned_reason
. (These are the columns output by the functionalign_taxa
.)The aligned name is a plant name that has been aligned to a taxon name in the APC or APNI by the align_taxa function.
Notes:
As the input for this function is a table with 5 columns (output by align_taxa), this function will only be used when you explicitly want to separate the alignment and updating components of APCalign. This function is the second half of create_taxonomic_update_lookup.
Value
A tibble with updated taxonomy for the specified plant names. The tibble contains the following columns:
original_name: the original plant name.
aligned_name: the input plant name that has been aligned to a taxon name in the APC or APNI by the align_taxa function.
accepted_name: the APC-accepted plant name, when available.
suggested_name: the suggested plant name to use. Identical to the accepted_name, when an accepted_name exists; otherwise the the suggested_name is the aligned_name.
genus: the genus of the accepted (or suggested) name; only APC-accepted genus names are filled in.
family: the family of the accepted (or suggested) name; only APC-accepted family names are filled in.
taxon_rank: the taxonomic rank of the suggested (and accepted) name.
taxonomic_dataset: the source of the suggested (and accepted) names (APC or APNI).
taxonomic_status: the taxonomic status of the suggested (and accepted) name.
taxonomic_status_aligned: the taxonomic status of the aligned name, before any taxonomic updates have been applied.
aligned_reason: the explanation of a specific taxon name alignment (from an original name to an aligned name).
update_reason: the explanation of a specific taxon name update (from an aligned name to an accepted or suggested name).
subclass: the subclass of the accepted name.
taxon_distribution: the distribution of the accepted name; only filled in if an APC accepted_name is available.
scientific_name_authorship: the authorship information for the accepted (or synonymous) name; available for both APC and APNI names.
taxon_ID: the unique taxon concept identifier for the accepted_name; only filled in if an APC accepted_name is available.
taxon_ID_genus: an identifier for the genus; only filled in if an APC-accepted genus name is available.
scientific_name_ID: an identifier for the nomenclatural (not taxonomic) details of a scientific name; available for both APC and APNI names.
row_number: the row number of a specific original_name in the input.
number_of_collapsed_taxa: when taxonomic_splits == "collapse_to_higher_taxon", the number of possible taxon names that have been collapsed.
See Also
load_taxonomic_resources
Other taxonomic alignment functions:
align_taxa()
,
create_taxonomic_update_lookup()
Examples
# Update taxonomy for two plant names and print the result
resources <- load_taxonomic_resources()
update_taxonomy(
dplyr::tibble(
original_name = c("Dryandra preissii", "Banksia acuminata"),
aligned_name = c("Dryandra preissii", "Banksia acuminata"),
taxon_rank = c("species", "species"),
taxonomic_dataset = c("APC", "APC"),
aligned_reason = c(NA_character_,
NA_character_)
),
resources = resources
)