Create a List with a Serial Comma

oxford(
  ...,
  cnj = c("or", "and"),
  quote = c("single", "double", "none"),
  fancy = getOption(x = "useFancyQuotes", default = TRUE)
)

Arguments

...

A character vector to join

cnj

Conjunction to use for final entry

quote

Quote the entries of ...; choose from:

  • single”: single quotes

  • double”: double quotes

  • none”: no extra quoting

fancy

Use fancy quotes; defaults to the value of the “useFancyQuotes” option (currently set to TRUE )

Value

... arranged into an English list with a serial comma when needed

See also

Examples

oxford('cell')
#> [1] "‘cell’"
oxford('cell', 'ident')
#> [1] "‘cell’ or ‘ident’"
oxford('cell', 'ident', 'gene')
#> [1] "‘cell’, ‘ident’, or ‘gene’"