Parse List/Vector to a character string

list2chr(list)

Arguments

list

A list or a vector which need to be deparsed as a string

Value

A character string representing the list

Note

This is the reverse for of @seealso chr2list

Examples

list2chr(c(1, 2, 3)) # "1; 2; 3"
#> [1] "1; 2; 3"
list2chr(list(c(1, 2), c(3, 4))) # "1, 2; 3, 4"
#> [1] "1, 2; 3, 4"
list2chr(list(1:2, 3:7)) # "1, 2; 3, 4, 5, 6, 7"
#> [1] "1, 2; 3, 4, 5, 6, 7"