paste_oxford_list: Create a prose string from a list or vector

View source: R/rmd_helpers.R

paste_oxford_listR Documentation

Create a prose string from a list or vector

Description

The word 'and' is inserted before the last element and an Oxford comma is used.

Usage

paste_oxford_list(x)

Arguments

x

a list or vector

Value

a string where each element in x is separated by a comma

Author(s)

Pat Schloss pschloss@umich.edu

Kelly Sovacool sovacool@umich.edu

Examples

paste_oxford_list(1:3)
paste_oxford_list(c("cats", "dogs", "turtles"))

SchlossLab/mothuR documentation built on Aug. 29, 2023, 1:32 a.m.