[R] Google's R Style Guide
Henrik Bengtsson
hb at stat.berkeley.edu
Fri Aug 28 18:10:49 CEST 2009
Quite a while ago I put up "R Coding Conventions (RCC) - a draft", now at:
http://docs.google.com/View?id=dddzqd53_2646dcw759cb
It's useful for beginners and those coding "randomly". Like it or not.
It's ok to try to persuade people coding randomly, but otherwise it is
waste of time to get into arguing over if-else or bracketing - we all
have our own favorite.
/Henrik
On Fri, Aug 28, 2009 at 8:02 AM, Kevin Wright<kw.stat at gmail.com> wrote:
> On Fri, Aug 28, 2009 at 9:41 AM, hadley wickham <h.wickham at gmail.com> wrote:
>
>> > Perhaps most of you have already seen this?
>> >
>> > http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html
>> >
>> > Comments/Critiques?
>>
>> I made my own version that reflects my personal biases:
>> http://had.co.nz/stat405/resources/r-style-guide.html
>>
>> Hadley
>>
>>
> In the spirit of "less is more", I find the underscores to be distracting
> and unneeded typing. Just simplify to camel caps.
>
> I echo Duncan's idea that a line should never start with "else". Duncan
> mentioned this in the context of cutting and pasting, but the other place
> that not having "else" start a line is when using the "browser" function and
> stepping through code line by line.
>
> Kevin
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>
More information about the R-help
mailing list