prettify_Shiny {prettifyAddins} | R Documentation |
Prettify code using Shiny
Description
Prettify some code using a Shiny app.
Usage
prettify_Shiny(contents = NA, language = NA, tabSize = NULL, themeInfo = NULL)
Arguments
contents |
the code to be prettified; there are three possibilities for
this argument:
|
language |
the language of the code, such as |
tabSize |
number of spaces of the indentation (usually |
themeInfo |
this argument is not important, it controls the theme of
the Shiny app;
it must be |
Value
The pretty code in a character string.
Examples
library(prettifyAddins)
code <- c(
"function f(x){",
"return x+1",
"}"
)
if(interactive()){
cat(prettify_Shiny(code, "javascript"))
}