I have been looking for this type of package for several days, and luckily found it today. Unquestionable R is powerful, however, R programming is unfriendly as far as I concern, mainly due to the lack of format shortcut, which makes the R codes rather ugly. (It is an absolute advantage of Matlab, for example, ctrl+R for comment, ctrl+T for uncomment, ctrl+I for smart indent, etc.)
FormatR is the package for tidying R source code, although it is less convenient to use than the straightforward shortcuts in Matlab, this package is good enough for me, what is it for? as the title suggest:
Below is a comparison before and after using FormatR.
Download the package at http://cran.r-project.org/web/packages/formatR/index.html
Tags – r
Read the full post at Excellent R Code Format Package.