Learn R Programming

taxotools (version 0.0.139)

cast_scientificname: Cast scientific name using taxonomic fields

Description

Combine scientific names using Genus, Species, Subspecies, Author etc.

Usage

cast_scientificname(
  dat = NULL,
  sciname = "scientificname",
  genus = "",
  subgenus = "",
  species = "",
  subspecies = "",
  author = "",
  verbose = FALSE
)

Value

data frame with additional columns for taxonomic fields

Arguments

dat

data frame containing taxonomic data

sciname

column name for scientific names, Default: 'scientificname'

genus

column name for genus, Default: 'genus'

subgenus

column name for subgenus, Default: ''

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(), 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("id" = c(11,12,13,14,15,16,17,18,19),
                     "genus" = c("Hypochlorosis","Hypochlorosis","Hypochlorosis",
                                 "Myrina","Hypochlorosis","Hypochlorosis",
                                 "Hypochlorosis","Seuku","Sithon"),
                     "subgenus" = c("","","","","","","(Pseudonotis)","",""),
                     "species" = c("ancharia","ancharia","ancharia",
                                   "lorquinii","ancharia","ancharia",
                                   "metilia","emlongi","lorquinii"),
                     "subspecies" = c("","ancharia","humboldti",
                                      "","tenebrosa"," tenebrosa",
                                      "","",""),
                     "author" = c("(Hewitson, 1869)","(Hewitson, 1869)","Druce, 1894",
                                  "C. & R. Felder, 1865","Rothschild, 1915",
                                  "Rothschild, 1915","Fruhstorfer, 1908",
                                  "(Domning et al., 1986)",""),
                     stringsAsFactors = FALSE)

cast_scientificname(mylist,genus = "genus", subgenus = "subgenus",
                    species = "species", subspecies = "subspecies",
                    author = "author")
# }

Run the code above in your browser using DataLab