[R] Google's R Style Guide

Esmail esmail.js at gmail.com
Sat Aug 29 15:39:02 CEST 2009


Duncan Murdoch wrote:
> On 8/28/2009 8:59 AM, Esmail wrote:
>> Perhaps most of you have already seen this?
>>
>>    http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html
>>
>> Comments/Critiques?
> 
> The rules are mostly reasonable, though they aren't the ones followed in 
> the R source.  One bad rule is the one on curly braces:
> 
> An opening curly brace should never go on its own line; a closing curly 
> brace should always go on its own line.
> 
> The problem is the second part.  If the closing brace is followed by an 
> else clause, the else should go on the same line as the brace, or things 
> will parse differently when pasted than they do in a function.  F

Excellent point, thanks, this has caused me some problems in the
past too.

Esmail




More information about the R-help mailing list