powered by
Generate a list formatted for printing from a vector.
printList(toPrint = letters[1:3], finalSepWord = "and", midSep = ",")
Character vector of length 1 with the values of toPrint concatenated and separated as specified in the text.
toPrint
Vector that you want to turn into a text list.
The last word to include, defaults to "and" but could be "or" or similar
Separator between items, defaults to ","
Mark Peterson
Note that this function includes an Oxford comma.
printList() printList(LETTERS[1:5]) printList(letters[1:5], "or", ";")
Run the code above in your browser using DataLab