formatR: Format R Code Automatically

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

Version: 1.1
Suggests: codetools, shiny, testit, knitr (≥ 1.9)
Published: 2015-03-29
Author: Yihui Xie
Maintainer: Yihui Xie <xie at>
License: GPL-2 | GPL-3 [expanded from: GPL]
NeedsCompilation: no
Materials: README NEWS
CRAN checks: formatR results


Reference manual: formatR.pdf
Vignettes: An Introduction to formatR
Package source: formatR_1.1.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
OS X Snow Leopard binaries: r-release: formatR_1.1.tgz, r-oldrel: formatR_1.0.tgz
OS X Mavericks binaries: r-release: formatR_1.1.tgz
Old sources: formatR archive

Reverse dependencies:

Reverse imports: knitr, Rd2roxygen, Rz
Reverse suggests: pvar, spca