Learn R Programming

taxotools (version 0.0.139)

cast_canonical: Construct canonical names

Description

Construct canonical names using Genus, Species and Subspecies fields. At times due to spaces or NAs in the data fields, it makes it tricky to generate canonical names.

Usage

cast_canonical(
  dat,
  canonical = "canonical",
  genus = "",
  species = "",
  subspecies = "",
  verbose = FALSE
)

Value

a data frame containing Canonical names field added or repopulated using filed names for Genus, Species and Subspecies specified in parameters

Arguments

dat

data frame containing taxonomic list

canonical

field name for canonical names. Default 'canonical'

genus

field name for Genus field

species

field name for Species field

subspecies

field name for Subspecies field

verbose

verbose output, Default: FALSE

See Also

Other Name functions: build_gen_syn(), cast_scientificname(), check_scientific(), expand_name(), get_accepted_names(), guess_taxo_rank(), list_higher_taxo(), melt_canonical(), melt_scientificname(), resolve_names(), taxo_fuzzy_match()

Examples

Run this code
# \donttest{
mylist <- data.frame("genus" = c("Acodon", "Akodon", "Abrothrix", "Abeomelomys"),
                     "species" = c("jelskii","longipilis","longipilis", "sevia"),
                     "subspecies" = c("pyrrhotis","castaneus","", NA))
cast_canonical(mylist,"canonical","genus","species","subspecies")
# }

Run the code above in your browser using DataLab