cg_surround | R Documentation |
Surround a string
cg_surround( x, surround = "()", style = c("single", "sandwich"), inner_indent = 0 )
x |
the string to surround |
surround |
enclosing characters. See details. |
style |
the style of surrounding. See details. |
inner_indent |
the indent of the inner part of the sandwich. Only used when ‘style = ’sandwich''. |
The argument to 'surround' should be 1 or 2 characters. If 1, then the returned string will be enclosed in that character. If 2, then the returned string will be enclosed by the first on the left and the second on the right. See examples for the style argument.
a surrounded string
x <- month.abb[1:3] cg_surround(x, '"') cg_surround(x, style = 'sandwich') cg_surround(x, '{}', 'sandwich', 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.