Description Usage Arguments Details Value Examples
Adds decorative formatting to parts of a string or source code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | flair(x, pattern, before = NULL, after = NULL, ...)
flair_rx(x, pattern, before = NULL, after = NULL, ...)
## S3 method for class 'with_flair'
flair_rx(x, pattern, before = NULL, after = NULL, ...)
## Default S3 method:
flair_rx(x, pattern, before = NULL, after = NULL, ...)
flair_quick(x, pattern, before = NULL, after = NULL, ...)
flair_all(x, ...)
## Default S3 method:
flair_all(x, ...)
## S3 method for class 'with_flair'
flair_all(x, ...)
flair_args(x, ...)
flair_funs(x, ...)
flair_input_vals(x, ...)
|
x |
A string or |
pattern |
A pattern to match. By default, this is a fixed pattern;
use |
before |
String giving specific html tags to insert before matched text. |
after |
String giving specific html tags to insert after matched text. |
... |
Formatting style options, passed to |
If input is a string object, flair
returns a formatted string.
If input is a with_flair
object, flair
returns a
with_flair
object with the source elements formatted.
Currently, flair
is only built for html formatting.
A string with formatting wrappers.
1 2 3 4 5 6 7 | code_string <- "foo <- mean(1:10, na.rm = TRUE)"
code_string %>% flair("foo")
code_string %>% flair_args()
code_string %>% flair_funs(color = "red")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.