Learn R Programming

taxotools (version 0.0.139)

cast_cs_field: Build a character (comma) separated List within field

Description

Builds a character (comma) separated list within a field given a data frame with primary field repeating values and secondary field with values to be character separated in the same field (secondary)

Usage

cast_cs_field(
  data,
  pri,
  sec,
  duplicate = FALSE,
  sepchar = ",",
  verbose = FALSE
)

Value

a data frame with two fields Primary and secondary (comma separated list)

Arguments

data

data frame containing primary and secondary data columns

pri

Primary field name (repeating values)

sec

Secondary field (values would be added to same record, comma separated)

duplicate

If true, duplicate entries are allowed in secondary field

sepchar

Character separator between the data items. Default is comma

verbose

verbose output, Default: FALSE

See Also

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

Examples

Run this code
# \donttest{
  scnames <- c("Abrothrix longipilis", "Abrothrix jelskii")
  SynList <- list_itis_syn(scnames)
  cast_cs_field(SynList,"canonical","synonym")
# }

Run the code above in your browser using DataLab