Excellent R Code Format Package

(This article was first published on Quantitative Finance Collector, and kindly contributed to R-bloggers)

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:

formatR: format R code automatically, farewell to ugly R code

Below is a comparison before and after using FormatR.
Open in new window

Open in new window

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.

To leave a comment for the author, please follow the link and comment on their blog: Quantitative Finance Collector.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)