Skip to contents

These function find when a taxonomic name is an autonym.

Usage

is_autonym(taxon_name)

add_is_autonym(
  collection,
  taxon_name_column = "TaxonName",
  progress_bar = FALSE
)

Arguments

taxon_name

The taxonomic name of a plant.

collection

A data frame containing a collection.

taxon_name_column

The name of the column containing the (original) Taxon name.

progress_bar

Logical flag, if TRUE show progress bar.

Value

TRUE if the taxonomic name is an autonym, otherwise FALSE.

Details

To obtain whether or not taxonomic names are autonyms we compare the words either side of a 'splitter'. The splitters are defined to be any of subsp., var., f., ssp. or nothosubsp.. If the words either side are identical we return TRUE otherwise we return FALSE.

Examples

is_autonym("Codiaeum variegatum var. variegatum")
#> [1] TRUE
is_autonym("Crinum pedunculatum f. purple")
#> [1] FALSE

taxon_names = c("Saintpaulia diplotricha", "Codiaeum variegatum var. variegatum")
collection = data.frame(ID = 1:2, name = taxon_names)
add_is_autonym(collection, taxon_name_column = 'name')
#>   ID                                name is_autonym
#> 1  1             Saintpaulia diplotricha      FALSE
#> 2  2 Codiaeum variegatum var. variegatum       TRUE