addSep: Add a separator between elements of a character list

View source: R/utils.R

addSepR Documentation

Add a separator between elements of a character list

Description

This function takes a character list and adds a separator string between each element. The last element is not followed by a separator.

Usage

addSep(charlist, sep = ", ")

Arguments

charlist

Character list to which the separator should be added.

sep

The separator string to be added between elements. Default is ", ".

Value

A single character string where elements from charlist are separated by sep.

Examples

li <- list("one","two","three")
addSep(li,"-")
addSep(li)

Epiconcept-Paris/STRAP-epiuf documentation built on Aug. 5, 2024, 3:41 a.m.