Helper function to format an enumeration.

enum(..., conjunction = "and", oxford = TRUE)

Arguments

...

one or more objects, converted to characters

conjunction

character, final conjunction

oxford

logical, oxford comma?

Examples

enum(letters[1:2])
#> [1] "a and b"
enum(letters[1:3])
#> [1] "a, b, and c"