format_named | R Documentation |
format_named
format_named(x, sep = ": ", colored = TRUE)
x |
character vector,
or a list of character object.
Input |
sep |
character scalar, see paste |
colored |
logical scalar, whether use two different color
to separate each element, default |
Function format_named returns a character vector.
x1 = c(a = 'a1', bc = '2\n3')
cat(format_named(x1), sep = '\n')
noout = lapply(format_named(x1), FUN = message)
x2 = list(a = '1\n2', b = character(), cd = '3\n4', efg = '5\n6\n7')
noout = lapply(format_named(x2, colored = FALSE), FUN = message)
x3 = c(a = '1\n2')
noout = lapply(format_named(x3), FUN = message)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.