prose_vector: Converts a character vector to readable prose

Description Usage Arguments Value See Also

Description

Converts a character vector to a prose list. Often when working with reproducible reports, a user will want to print a list of character values but needs to respect English grammar: for example, "dog", "cat", "mouse" should be rendered as "dog, cat and mouse".

Usage

1
prose_vector(vals, oxford = FALSE, and = "and")

Arguments

vals

a character vector

oxford

a boolean indicating whether Oxford comma should be used. If true a comma is placed before the and word.

and

word before penultimate entry. Default = "and"

Value

a character of length one

See Also

https://gist.github.com/jkeirstead/48bf5845b235dc7a8d5a


jkeirstead/jkr documentation built on May 19, 2019, 11:41 a.m.