| collapse | R Documentation |
Collapses a vector into a comma delimited string with the word 'and' between the last two entries.
collapse(
x,
sep = ", ",
maxItems = 10,
last = c("%1$s and %2$s", "%1$s, %2$s and %3$d more",
"%1$s, %2$s and %3$d more"),
quote = NULL
)
x |
the vector |
sep |
the separator for all but the last entry |
maxItems |
If there are more than this many items, only the first maxItems are displayed. |
last |
three sprintf formats (see details) |
quote |
A function used to quote the elements (such as sQuote or dQuote) or NULL |
The last= argument contains three sprintf formats. The first is used if there are fewer than maxItems items, the second if there are maxItems+1 items, the first if there are more than maxItems+1 items.
The arguments are passed as the last, shown.
a string
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.