ts_parse_names: Parse taxonomic names

View source: R/ts_parse_names.R

ts_parse_namesR Documentation

Parse taxonomic names

Description

Requires taxon-tools or docker to be installed.

Usage

ts_parse_names(
  taxa,
  tbl_out = getOption("ts_tbl_out", default = FALSE),
  quiet = FALSE,
  docker = getOption("ts_docker", default = FALSE)
)

Arguments

taxa

Character vector; taxon names to be parsed by taxon-tools parsenames. Missing values not allowed. Must all be unique.

tbl_out

Logical vector of length 1; should a tibble be returned? If FALSE (default), output will be a data.frame. This argument can be controlled via the option ts_tbl_out; see Examples.

quiet

Logical; if TRUE, suppress warning messages that would normally be issued

docker

Logical; if TRUE, docker will be used to run taxon-tools (so that taxon-tools need not be installed).

Details

Parses scientific names into their component parts (genus, species, variety, author, etc).

Value

A dataframe including the following columns.

  • id: A unique ID number assigned to the input name

  • name: The input name

  • genus_hybrid_sign: Hybrid sign for genus

  • genus_name: Genus name

  • species_hybrid_sign: Hybrid sign for species

  • specific_epithet: Specific epithet (name)

  • infraspecific_rank: Infraspecific rank

  • infraspecific_epithet: Infraspecific epithet (name)

  • author: Name of taxon

Examples

# Using local taxon-tools installation
if (ts_tt_installed()) {

  ts_parse_names("Foogenus x barspecies var. foosubsp (L.) F. Bar")
  ts_parse_names(
    "Foogenus x barspecies var. foosubsp (L.) F. Bar", tbl_out = TRUE)

  # If you always want tibble output without specifying `tbl_out = TRUE`
  # every time, set the option:
  options(ts_tbl_out = TRUE)
  ts_parse_names("Foogenus x barspecies var. foosubsp (L.) F. Bar")
  ts_parse_names("Crepidomanes minutum (Blume) K. Iwats.")

}

# Using docker
if (babelwhale::test_docker_installation()) {

ts_parse_names(
  "Foogenus x barspecies var. foosubsp (L.) F. Bar",
  docker = TRUE)

}


joelnitta/taxastand documentation built on Sept. 21, 2022, 12:49 p.m.