formatR: Format R Code Automatically
Version 1.5

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()).

AuthorYihui Xie [aut, cre], Eugene Ha [ctb], Kohske Takahashi [ctb], Ed Lee [ctb]
Date of publication2017-04-25 23:31:46 UTC
MaintainerYihui Xie <xie@yihui.name>
LicenseGPL
Version1.5
URL https://yihui.name/formatR
Package repositoryView on CRAN
InstallationInstall the latest version of this package by entering the following in R:
install.packages("formatR")

Getting started

README.md
formatR

Popular man pages

tidy_app: A Shiny app to format R code
tidy_dir: Format all R scripts under a directory, or specified R...
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
See all...

All man pages Function index File listing

Man pages

tidy_app: A Shiny app to format R code
tidy_dir: Format all R scripts under a directory, or specified R...
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

Functions

count_tokens Source code
deparse_collapse Source code
find_breaks Source code
fix_parse_data Source code
get_src_string Source code
mask_comments Source code
mask_inline Source code
mask_line_break Source code
move_else Source code
move_leftbrace Source code
overflow_message Source code
parse_only Source code
rand_string Source code
reflow_comments Source code
reindent_lines Source code
replace_assignment Source code
restore_bs Source code
tidy_app Man page Source code
tidy_block Source code
tidy_dir Man page Source code
tidy_eval Man page Source code
tidy_file Man page Source code
tidy_source Man page Source code
tidy_usage Source code
trimws Source code
unmask_source Source code
usage Man page Source code

Files

inst
inst/format
inst/format/messy.R
inst/shiny
inst/shiny/ui.R
inst/shiny/server.R
inst/shiny/www
inst/shiny/www/shiny-handler.js
inst/shiny/DESCRIPTION
inst/shiny/Readme.md
inst/doc
inst/doc/formatR.R
inst/doc/formatR.html
inst/doc/formatR.Rmd
tests
tests/testit
tests/testit/test-utils.R
tests/testit/test-tidy.R
tests/testit/test-usage.R
tests/test-all.R
NAMESPACE
NEWS
R
R/utils.R
R/eval.R
R/usage.R
R/tidy.R
R/shiny.R
vignettes
vignettes/formatR.Rmd
README.md
MD5
build
build/vignette.rds
DESCRIPTION
man
man/tidy_app.Rd
man/tidy_source.Rd
man/tidy_dir.Rd
man/usage.Rd
man/tidy_eval.Rd
formatR documentation built on May 19, 2017, 8:49 a.m.

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.