Convert named list to string
print_named_list.RdThis function converts a named list to a string, with each element of the list on a separate line and with its name.
Examples
my_list <- list(a = 1, b = 2, c = 3)
print_named_list(my_list)
#> [1] "a: 1\nb: 2\nc: 3\n"