Description Usage Arguments Examples
Use this utility to create nicely formatted lists for error messages and the like.
1 | comma_list(x, sep = ", ", sep2 = " and ", sep.last = ", and ", terminator = "")
|
x |
a list that can be converted into a character. |
sep |
the typical separator |
sep2 |
the separator to use in the case of only two elements. |
sep.last |
the separator to use between the last and next to last elements when there are at least 3 element in the list. |
terminator |
concatenated to the end after the list is concluded. |
1 2 3 | comma_list(c("you", "I"))
comma_list(c("you", "I"), sep2=" & ")
comma_list(head(letters), sep.last=', ', term=', ...')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.