powered by
Use this utility to create nicely formatted lists for error messages and the like.
comma_list(x, sep = ", ", sep2 = " and ", sep.last = ", and ", terminator = "")
a list that can be converted into a character.
the typical separator
the separator to use in the case of only two elements.
the separator to use between the last and next to last elements when there are at least 3 element in the list.
concatenated to the end after the list is concluded.
# NOT RUN { comma_list(c("you", "I")) comma_list(c("you", "I"), sep2=" & ") comma_list(head(letters), sep.last=', ', term=', ...') # }
Run the code above in your browser using DataLab