commasep | R Documentation |
Convert the elements of a vector into character strings and paste them together, separated by commas.
commasep(x, join = " and ", flatten = TRUE)
x |
Vector of items in the list. |
join |
The string to be used to separate the last two items in the list. |
flatten |
Logical value indicating whether to return a single character string
( |
A character string (if flatten=TRUE
, the default)
or a list of character strings.
.
commasep(letters[1:4])
y <- commasep(sQuote(letters[1:4]))
cat(y, fill=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.