collapse_and: Collapse elements of a text vector with comma/and.

View source: R/tools.R

collapse_andR Documentation

Collapse elements of a text vector with comma/and.

Description

Collapses elements of a text vector with commas and inserts 'and' before the last element.

Usage

collapse_and(x, oxford = TRUE)

Arguments

x

a text vector or a vector coercible to a character.

oxford

logical, should the 'and' be placed according to the Oxford comma rule?

Value

a character string.


PiotrTymoszuk/figur documentation built on July 16, 2024, 1:15 a.m.