h_short_list: Make a Short List of a Character Vector

View source: R/utils.R

h_short_listR Documentation

Make a Short List of a Character Vector

Description

[Experimental]

This helper function makes a short list string, e.g. "a, b, ..., z" out of a character vector, e.g. letters.

Usage

h_short_list(x, sep = ", ", thresh = 3L)

Arguments

x

(character)
input which should be listed.

sep

(string)
separator to use.

thresh

(count)
threshold to use, if the length of x is larger then the list will be shortened using the ... ellipsis.

Value

String with the short list.

Examples

h_short_list(letters)
h_short_list(letters[1:3])
h_short_list(LETTERS[1:5], sep = ";", thresh = 5L)

insightsengineering/hermes documentation built on Sept. 19, 2024, 9:06 p.m.