format_text_r | R Documentation |
R
expressions in charactersGet re-formatted R
expressions in characters
format_text_r(
expr,
quoted = FALSE,
reformat = TRUE,
width.cutoff = 80L,
indent = 2,
wrap = TRUE,
args.newline = TRUE,
blank = FALSE,
...
)
html_highlight_code(
expr,
class = NULL,
quoted = FALSE,
reformat = TRUE,
copy_on_click = TRUE,
width.cutoff = 80L,
indent = 2,
wrap = TRUE,
args.newline = TRUE,
blank = FALSE,
...,
hover = c("overflow-visible-on-hover", "overflow-auto")
)
expr |
|
quoted |
whether |
reformat |
whether to reformat |
width.cutoff , indent , wrap , args.newline , blank , ... |
passed to
|
class |
class of |
copy_on_click |
whether to copy to clipboard if user clicks on the code; default is true |
hover |
mouse hover behavior |
format_text_r
returns characters,
html_highlight_code
returns the 'HTML' tags wrapping expressions
in <pre>
tag
get_construct_string
s <- format_text_r(print(local({a<-1;a+1})))
cat(s)
x <- info_box("Message", icon = "cogs")
s <- format_text_r(get_construct_string(x),
width.cutoff = 15L, quoted = TRUE)
cat(s)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.