This helper function makes a short list string, e.g. "a, b, ..., z"
out of a character vector, e.g. letters.
h_short_list(x, sep = ", ", thresh = 3L)(character)
input which should be listed.
(string)
separator to use.
(count)
threshold to use, if the length of x is larger
then the list will be shortened using the ... ellipsis.
String with the short list.
h_short_list(letters)
#> [1] "a, b, ..., z"
h_short_list(letters[1:3])
#> [1] "a, b, c"
h_short_list(LETTERS[1:5], sep = ";", thresh = 5L)
#> [1] "A;B;C;D;E"