This function calls tidy_source() to format R code in a Shiny app. The arguments of tidy_source() are presented in the app as input widgets such as checkboxes.
tidy_source
(Package: formatR) :
Reformat R code while preserving blank lines and comments
This function returns reformatted source code; it tries to preserve blank lines and comments, which is different with parse and deparse. It can also replace = with <- where = means assignments, and reindent code by a specified number of spaces (default is 4).
tidy_dir
(Package: formatR) :
Format the R scripts under a directory
This function first looks for all the R scripts under a directory (using the pattern "[.][RrSsQq]$"), then uses tidy_source to tidy these scripts. The original scripts will be overwritten with reformatted code if reformatting was successful. You may need to back up the original directory first if you do not fully understand the tricks tidy_source is using.
usage
(Package: formatR) :
Show the usage of a function
Print the reformatted usage of a function. The arguments of the function are searched by argsAnywhere, so the function can be either exported or non-exported in a package. S3 methods will be marked.
tidy_eval
(Package: formatR) :
Evaluate R code and mask the output by a prefix
This function is designed to insert the output of each chunk of R code into the source code without really breaking the source code, since the output is masked in comments.