format_text_r {shidashi} | R Documentation |
Get re-formatted R
expressions in characters
Description
Get re-formatted R
expressions in characters
Usage
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")
)
Arguments
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 |
Value
format_text_r
returns characters,
html_highlight_code
returns the 'HTML' tags wrapping expressions
in <pre>
tag
See Also
Examples
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)
[Package shidashi version 0.1.6 Index]