Learn R Programming

schtools (version 0.4.1)

paste_oxford_list: 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)

Value

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

Arguments

x

a list or vector

Author

Pat Schloss pschloss@umich.edu

Kelly Sovacool sovacool@umich.edu

Examples

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

Run the code above in your browser using DataLab