Skip to contents

This function collapses a vector into a single string, with elements separated by a comma and a space.

Usage

collapse(x)

Arguments

x

A vector of elements to collapse.

Value

A single string with all elements from the vector separated by a comma and a space.

Examples

collapse(c("a", "b", "c"))
#> Error in collapse(c("a", "b", "c")): could not find function "collapse"
# Returns: "a, b, c"