str_collapse

0th

Percentile

Collapse Strings

Collapse multiple strings into a single string.

Usage
str_collapse(str, sep = ", ", quote = "", n = Inf,
  ellipsis = "[...]")
Arguments
str

:: character() Vector of strings.

sep

:: character(1) String used to collapse the elements of x.

quote

:: character(1) Quotes to use around each element of x.

n

:: integer(1) Number of elements to keep from x. See utils::head().

ellipsis

:: character(1) If the string has to be shortened, this is signaled by appending ellipsis to str. Default is " [...]".

Value

(character(1)).

Aliases
  • str_collapse
Examples
# NOT RUN {
str_collapse(letters, quote = "'", n = 5)
# }
Documentation reproduced from package mlr3misc, version 0.1.0, License: LGPL-3

Community examples

Looks like there are no examples yet.