align_taxa {APCalign}R Documentation

Align Australian plant scientific names to the APC or APNI

Description

For a list of Australian plant names, find taxonomic or scientific name alignments to the APC or APNI through standardizing formatting and fixing spelling errors.

Usage case: Users will run this function if they wish to see the details of the matching algorithms, the many output columns that the matching function compares to as it seeks the best alignment. They may also select this function if they want to adjust the “fuzziness” level for fuzzy matches, options not allowed in create_taxonomic_update_lookup. This function is the first half of create_taxonomic_update_lookup.

Usage

align_taxa(
  original_name,
  output = NULL,
  full = FALSE,
  resources = load_taxonomic_resources(),
  quiet = FALSE,
  fuzzy_abs_dist = 3,
  fuzzy_rel_dist = 0.2,
  fuzzy_matches = TRUE,
  imprecise_fuzzy_matches = FALSE,
  APNI_matches = TRUE,
  identifier = NA_character_
)

Arguments

original_name

A list of names to query for taxonomic alignments.

output

(optional) The name of the file to save the results to.

full

Parameter to determine how many columns are output

resources

the taxonomic resources used to align the taxa names. Loading this can be slow, so call load_taxonomic_resources separately to greatly speed this function up and pass the resources in.

quiet

Logical to indicate whether to display messages while aligning taxa.

fuzzy_abs_dist

The number of characters allowed to be different for a fuzzy match.

fuzzy_rel_dist

The proportion of characters allowed to be different for a fuzzy match.

fuzzy_matches

Fuzzy matches are turned on as a default. The relative and absolute distances allowed for fuzzy matches to species and infraspecific taxon names are defined by the parameters fuzzy_abs_dist and fuzzy_rel_dist

imprecise_fuzzy_matches

Imprecise fuzzy matches uses the fuzzy matching function with lenient levels set (absolute distance of 5 characters; relative distance = 0.25). It offers a way to get a wider range of possible names, possibly corresponding to very distant spelling mistakes. This is FALSE as default and all outputs should be checked as it often makes erroneous matches.

APNI_matches

Name matches to the APNI (Australian Plant Names Index) are turned on as a default.

identifier

A dataset, location or other identifier, which defaults to NA.

Details

Notes:

Value

A tibble with columns that include original_name, aligned_name, taxonomic_dataset, taxon_rank, aligned_reason, alignment_code.

See Also

load_taxonomic_resources

Other taxonomic alignment functions: create_taxonomic_update_lookup(), update_taxonomy()

Examples


resources <- load_taxonomic_resources()

# example 1
align_taxa(c("Poa annua", "Abies alba"), resources = resources)

# example 2
input <- c("Banksia serrata", "Banksia serrate", "Banksia cerrata", 
"Banksia serrrrata", "Dryandra sp.", "Banksia big red flowers")

aligned_taxa <-
  APCalign::align_taxa(
    original_name = input,
    identifier = "APCalign test",
    full = TRUE,
    resources = resources
  ) 
  




[Package APCalign version 1.0.1 Index]