formatR: Format R Code Automatically

Share:

Provides a function tidy_source() to format R source code. Spaces and indent will be added to the code automatically, and comments will be preserved under certain conditions, so that R code will be more human-readable and tidy. There is also a Shiny app as a user interface in this package (see tidy_app()).

Author
Yihui Xie
Date of publication
2016-05-09 17:52:57
Maintainer
Yihui Xie <xie@yihui.name>
License
GPL
Version
1.4
URLs

View on CRAN

Man pages

tidy_app
A Shiny app to format R code
tidy_dir
Format the R scripts under a directory
tidy_eval
Evaluate R code and mask the output by a prefix
tidy_source
Reformat R code while preserving blank lines and comments
usage
Show the usage of a function

Files in this package

formatR
formatR/inst
formatR/inst/format
formatR/inst/format/messy.R
formatR/inst/shiny
formatR/inst/shiny/ui.R
formatR/inst/shiny/server.R
formatR/inst/shiny/www
formatR/inst/shiny/www/shiny-handler.js
formatR/inst/shiny/DESCRIPTION
formatR/inst/shiny/Readme.md
formatR/inst/doc
formatR/inst/doc/formatR.R
formatR/inst/doc/formatR.html
formatR/inst/doc/formatR.Rmd
formatR/tests
formatR/tests/testit
formatR/tests/testit/test-utils.R
formatR/tests/testit/test-tidy.R
formatR/tests/test-all.R
formatR/NAMESPACE
formatR/NEWS
formatR/R
formatR/R/utils.R
formatR/R/eval.R
formatR/R/usage.R
formatR/R/tidy.R
formatR/R/shiny.R
formatR/vignettes
formatR/vignettes/formatR.Rmd
formatR/README.md
formatR/MD5
formatR/build
formatR/build/vignette.rds
formatR/DESCRIPTION
formatR/man
formatR/man/tidy_app.Rd
formatR/man/tidy_source.Rd
formatR/man/tidy_dir.Rd
formatR/man/usage.Rd
formatR/man/tidy_eval.Rd