Collapses a character vector of any length into a length 1 vector.
glue_collapse(x, sep = "", width = Inf, last = "")
| x | The character vector to collapse. |
|---|---|
| sep | a character string to separate the terms. Not
|
| width | The maximum string width before truncating with |
| last | String used to separate the last two items if |
#> 12345678910#> 12...glue_collapse(1:4, ", ", last = " and ")#> 1, 2, 3 and 4#> 1, 2, 3 and 4