R Style guide

Image

Here is a style guide for R, designed in collaboration with the entire R user community at Google :

https://google-styleguide.googlecode.com/svn/trunk/Rguide.xml

I don’t always use all these rules, I can forget some of them sometimes. But we all need to have them in mind, in order to keep our code shareable. In the spirit of R.

A package that helps in automatically formatting R scripts, is formatR. The package’s wiki on GitHub contains good examples of use of this tool.

 

Advertisements

Leave a comment

Filed under Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s