Skip to contents

Enumerate multiple elements of a vector or list.

Usage

enumerate(x, quote_fun = backquote, conjunction = "and")

Arguments

x

A vector or list

quote_fun

Quoting function, defaults to backquote. If set to NULL, the elements are not quoted.

conjunction

Character to be used in the message, defaults to "and".

Value

A character vector

See also

Helpers for working with Quotes and Quoting: backquote(), dquote(), squote()

Examples

enumerate(c("one", "two", "three"))
#> [1] "`one`, `two` and `three`"

enumerate(c(1, 2, 3), quote_fun = NULL)
#> [1] "1, 2 and 3"