Skip to contents

These functions extract the taxon type from a taxon name, in particular whether an item is: an indeterminate, a species, a subspecies, a variety, a forma, a cultivar or a hybrid.

Usage

taxon_type(taxon_name)

add_taxon_type(
  collection,
  taxon_name_column = "TaxonName",
  POWO_taxon_name_column = NA,
  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.

POWO_taxon_name_column

The name of the column containing the POWO (WCVP) Taxon name.

progress_bar

Logical flag, if TRUE show progress bar.

Details

The aim of these functions to to extract the biological and horticultural characteristics of items via their taxonomic name. For each taxonomic name the functions will return a string containing which taxon types it has. These are:

  • "0.indet": The item is indeterminate.

  • "1.species": The item is a species.

  • "2.subsp": The item is a subspecies.

  • "3.var": The item is a variety.

  • "4.f": The item is a forma.

  • "5.cultivar": The item is a cultivar.

  • "6.hybrid": The item is a hybrid.

0-4 are biological characteristics and each item can only have one of these characteristics.

5-6 are horticultural characteristics and item can have none, one or both of these.

taxon_type() returns the taxon type given a single taxonomic name.

add_taxon_type() adjoins a column called taxon_type to the original collection containing the taxon type of each item. If is.na(POWO_taxon_name_column) == TRUE then the taxon type is extracted purely from the taxon names contained in the column taxon_name_column. If POWO_taxon_name_column is a name of a column in collection then the taxon type is extracted from the column corresponding to it, if there are any missing values then the entries corresponding to taxon_name_column are used instead.

Examples

taxon_type("Aridaria sp.")
#> [1] "0.indet"
taxon_type("Saxegothaea conspicua")
#> [1] "1.species"
taxon_type("Rhododendron charitopes subsp. tsangpoense")
#> [1] "2.subsp"
taxon_type("Aquilegia flabellata f. alba 'green'")
#> [1] "4.f, 5.cultivar"

taxon_names = c("Saintpaulia diplotricha", "Aridaria sp.")
POWO_taxon_name = c("Streptocarpus ionanthus var. diplotrichus", NA)
collection = data.frame(name = taxon_names, POWO = POWO_taxon_name)
add_taxon_type(collection, taxon_name_column = 'name', POWO_taxon_name_column = 'POWO')
#>                      name                                      POWO taxon_type
#> 1 Saintpaulia diplotricha Streptocarpus ionanthus var. diplotrichus      3.var
#> 2            Aridaria sp.                                      <NA>    0.indet