tool to auto-format R code tool to auto-format R code r r

tool to auto-format R code


Although ESS is a much better long-term solution, if you just have a quick formatting job, perhaps this packge will help: http://yihui.name/en/?s=formatr.


Emacs with ESS does it exceedingly well -- and the default settings as recommended by R Core are in Section 7 R coding standards of the R Internals manual.


I use StatET, and it works quite well for this.

You could also try the formatR package on CRAN.