Rule based collapse

collapse_items(x, and = FALSE, or = FALSE, quotes = FALSE)

Arguments

x

A character string

and

Logical, collapse using "and"

or

Logical, collapse using "or"

quotes

Logical, should it be quoted?