Learn R Programming

taxotools (version 0.0.139)

melt_canonical: Deconstruct canonical names

Description

Deconstruct canonical names into Genus, Species and Subspecies fields

Usage

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

Value

a data frame containing Genus, Species and Subspecies fields added or repopulated using data in canonical name field. If unable to parse the name Genus, Species and Subspecies fields will have NA.

Arguments

dat

data frame containing taxonomic list

canonical

field name for canonical names

genus

field name for Genus

species

field name for Species

subspecies

field name for Subspecies

verbose

verbose output, Default: FALSE

See Also

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

Examples

Run this code
# \donttest{
mylist <- data.frame("canonical" = c("Abrothrix longipilis",
                                    "Acodon hirtus",
                                    "Akodon longipilis apta",
                                    "AKODON LONGIPILIS CASTANEUS",
                                    "Chroeomys jelskii",
                                    "Acodon jelskii pyrrhotis"),
                    stringsAsFactors = FALSE)
melt_canonical(mylist,"canonical","genus","species","subspecies")
# }

Run the code above in your browser using DataLab