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

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to