powered by
Collapse multiple strings into a single string.
str_collapse(str, sep = ", ", quote = character(), n = Inf, ellipsis = "[...]")
(character(1)).
character(1)
(character()) Vector of strings.
character()
(character(1)) String used to collapse the elements of x.
x
(character()) Quotes to use around each element of x.
Will be replicated to lenght 2.
(integer(1)) Number of elements to keep from x. See utils::head().
integer(1)
utils::head()
(character(1)) If the string has to be shortened, this is signaled by appending ellipsis to str. Default is " [...]".
ellipsis
str
" [...]"
str_collapse(letters, quote = "'", n = 5)
Run the code above in your browser using DataLab