Learn R Programming

taxotools (version 0.0.139)

taxo2syn: Taxolist to Synonym list

Description

Converts a taxolist to Synonym list with Accepted Names and Synonym columns format

Usage

taxo2syn(
  taxolist,
  canonical = "canonical",
  synonym = "synonym",
  duplicate = FALSE,
  sepchar = ","
)

Value

returns a synonym list all the names in same column and accepted names linked to synonyms with id and accid fields

Arguments

taxolist

taxolist

canonical

names column name, Default: 'canonical'

synonym

Synonym column name to be created, Default: 'synonym'

duplicate

If true, duplicate entries are allowed in secondary field

sepchar

Character separator between the data items. Default is comma

Details

Converts a taxolist to synonyms list

See Also

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

Examples

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

Run the code above in your browser using DataLab