Learn R Programming

taxotools (version 0.0.139)

melt_scientificname: Melt scientific name into fields

Description

Parse scientific names into Genus, Species, Subspecies, Author etc.

Usage

melt_scientificname(
  dat,
  sciname = "",
  genus = "genus",
  subgenus = "subgenus",
  species = "species",
  subspecies = "subspecies",
  author = "author",
  verbose = FALSE
)

Value

data frame with additional columns for taxonomic fields

Arguments

dat

data frame containing scientific names

sciname

column name for scientific names, Default: ''

genus

column name for genus, Default: 'genus'

subgenus

column name for subgenus, Default: 'subgenus'

species

column name for species, Default: 'species'

subspecies

column name for subspecies, Default: 'subspecies'

author

column name for author, Default: 'author'

verbose

verbose output, Default: FALSE

Details

Helpful function to break down Scientific names into Genus, Subgenus, species, Subspecies, Author so that the names can be constructed into canonical names for matching

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_canonical(), resolve_names(), taxo_fuzzy_match()

Examples

Run this code
# \donttest{
mylist <- data.frame("id"= c(11,12,13,14,15,16,17,18,19),
                     "scname" = c("Hypochlorosis ancharia (Hewitson, 1869)",
                                  "Hypochlorosis ancharia ssp. ancharia (Hewitson, 1869)",
                                  "Hypochlorosis ancharia ssp. humboldti Druce, 1894",
                                  "Myrina lorquinii C. & R. Felder, 1865",
                                  "Hypochlorosis ancharia tenebrosa Rothschild, 1915",
                                  "Hypochlorosis ancharia  tenebrosa Rothschild, 1915",
                                  "Hypochlorosis (Pseudonotis) metilia Fruhstorfer, 1908",
                                  "Seuku emlongi (Domning et al., 1986)",
                                  "Sithon lorquinii"),
                     stringsAsFactors = FALSE)

melt_scientificname(mylist, sciname="scname", genus="genus",
                    subgenus="subgenus", species="species",subspecies="subspecies",
                    author="author")
# }

Run the code above in your browser using DataLab