Collapse multiple strings into a single string.
Usage
str_collapse(str, sep = ", ", quote = character(), n = Inf, ellipsis = "[...]")
Arguments
- str
(
character()
)
Vector of strings.- sep
(
character(1)
)
String used to collapse the elements ofx
.- quote
(
character()
)
Quotes to use around each element ofx
.Will be replicated to lenght 2.
- n
(
integer(1)
)
Number of elements to keep fromx
. Seeutils::head()
.- ellipsis
(
character(1)
)
If the string has to be shortened, this is signaled by appendingellipsis
tostr
. Default is" [...]"
.