Create a string from a vector for printing where vector elements are sensibly pasted together, collapsing using commas and 'and' to conjoin vector elements.

pasteByLength(x)

Arguments

x

character.

Value

character.

Examples

pasteByLength(c("a", "b", "c"))
#> [1] "a, b and c"