Learn R Programming

taxotools (version 0.0.139)

get_synonyms: get synonyms

Description

get all the synonyms from the master list for the names in the checklist

Usage

get_synonyms(master = NULL, checklist = NULL, commasep = FALSE, verbose = TRUE)

Value

Data frame with names from the checklist and their synonyms present in the master list

Arguments

master

master list of names (taxolist)

checklist

list of names to be processed (taxolist)

commasep

return list should be comma separated list or each synonym on its own row. Default false

verbose

verbose output on the console

See Also

Other List functions: DwC2taxo(), cast_cs_field(), compact_ids(), match_lists(), melt_cs_field(), merge_lists(), syn2taxo(), synonymize_subspecies(), taxo2DwC(), taxo2doc(), taxo2syn(), wiki2taxo()

Examples

Run this code
# \donttest{
master <- data.frame("id" = c(1,2,3,4,5),
                        "canonical" = c("Hypochlorosis ancharia",
                                        "Pseudonotis humboldti",
                                        "Myrina ancharia",
                                        "Hypochlorosis ancharia obiana",
                                        "Hypochlorosis lorquinii"),
                        "family" = c("Lycaenidae", "Lycaenidae", 
                                     "Lycaenidae", "Lycaenidae",
                                      "Lycaenidae"),
                        "accid" = c(0,1,1,0,0),
                        "source" = c("itis","wiki","wiki","itis",
                                     "itis"),
                        stringsAsFactors = FALSE)
checklist <- data.frame("id" = c(1,2,3),
                     "canonical" = c("Hypochlorosis ancharia",
                                     "Hypochlorosis tenebrosa",
                                     "Hypochlorosis ancharia tenebrosa"),
                     "family" = c("Lycaenidae", "Lycaenidae", "Lycaenidae"),
                     "accid" = c(0,1,0),
                     "source" = c("itis","itis","itis"),
                     stringsAsFactors = FALSE)

get_synonyms(master,checklist,commasep=FALSE)
get_synonyms(master,checklist,commasep=TRUE)
# }

Run the code above in your browser using DataLab