Description Usage Arguments Details Value Examples
Returns a text representation of a list, whose lower level elements are atomic vectors.
1 2 3 4 5 6 7 | list_to_chr(
x,
atom_sep = ";",
list_sep = "|",
simplify_threshold = Inf,
simplify_sep = "->"
)
|
x |
a list, whose lower level elements are atomic vectors. |
atom_sep |
separator for the elements of atomic vectors. |
list_sep |
separator for the elements of lists. |
simplify_threshold |
non-negative number of atomic elements from which the character string is simplified (only first and last elements separated by a separator, "->" by default). |
simplify_sep |
a separator (one or several characters) if the string has to be simplified. |
Even if the list has several hierarchical levels, the returned value is always a string. To preserve a complex hierarchy, use lapply or purr::map_chr at a given hierarchical level.
A string, the text representation of x.
1 2 | list_to_chr(list(letters[1:2], 1:3, 4))
list_to_chr(list(letters, LETTERS), simplify_threshold = 10)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.