| cc {concatenate} | R Documentation |
Comma Concatenation
Description
cc collapses text into a comma-separated list (the colloquial kind of
list). cc_or and cc_and insert "or" and "or"
before the last element.
Usage
cc(...)
## S4 method for signature 'data.frame'
cc(...)
cc_or(..., oxford = FALSE)
cc_and(..., oxford = FALSE)
Arguments
... |
Character vectors or a |
oxford |
Whether to use the Oxford comma. |
Details
The data.frame method is dispatched when the first argument in
... is a data.frame. It operates row-wise. If there are
subsequent arguments to cc they are be ignored.
Value
A length-one character vector in which each element in ... is
separated by a comma (and a space).
See Also
cn for cc with (grammatical) number awareness
(like ngettext) and substitution (like sprintf)
Examples
cc("hello", "world")
a <- "one thing"
b <- "another"
cc_or(a, b)
a <- "this"
b <- c("that", "the other")
cc_and(a, b)
[Package concatenate version 1.0.0 Index]