vec2prose | R Documentation |
Takes a vector and returns prose listing vector elements. Suitable for use in inline text in Rmarkdown.
vec2prose(x, oxford_comma = TRUE, na.rm = TRUE, warn = TRUE)
x |
character vector of length > 0 (after removing |
oxford_comma |
logical. If TRUE (default), output includes oxford comma. |
na.rm |
logical. If TRUE (Default), remove all |
warn |
logical. If TRUE (Default), warn about |
character vector of length 1.
x <- c("dogs", "cats", "pigs")
vec2prose(x)
vec2prose(x, oxford_comma = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.