printList | R Documentation |
Generate a list formatted for printing from a vector.
printList(toPrint = letters[1:3], finalSepWord = "and", midSep = ",")
toPrint |
Vector that you want to turn into a text list. |
finalSepWord |
The last word to include, defaults to "and" but could be "or" or similar |
midSep |
Separator between items, defaults to "," |
Note that this function includes an Oxford comma.
Character vector of length 1 with the values of toPrint
concatenated
and separated as specified in the text.
Mark Peterson
printList()
printList(LETTERS[1:5])
printList(letters[1:5], "or", ";")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.