This function alows you to take a string of words and combine them into a sentance list. For example, 'apples', 'oranges', 'pears' would become 'apples, oranges, and pears'. This function uses oxford commas.

listABandC(x)

Arguments

x

Character strings you want in your string.

Examples

listABandC(c(1,2,"hello",4,"world",6))
#> [1] "1, 2, hello, 4, world, and 6"