str_list: List items

Description Usage Arguments Value Examples

Description

str_list() wraps base::paste0() in order to turn a list of character strings into a grammatically correct list without an Oxford Comma by default. Sue me.

Usage

1
str_list(..., sep = ", ", last = " and ")

Arguments

...

one or more character vectors or coercible to character vector.

sep

a string to seperate elements except last.

last

a string to seperate last element.

Value

a character string.

Examples

1
2
shopping_list <- c("bread", "milk", "eggs")
str_list(shopping_list)

tstev/pedr documentation built on May 11, 2019, 4:06 p.m.