[R] Google's R Style Guide

Peter Dalgaard P.Dalgaard at biostat.ku.dk
Fri Aug 28 15:25:22 CEST 2009


Esmail wrote:
> Perhaps most of you have already seen this?
> 
>   http://google-styleguide.googlecode.com/svn/trunk/google-r-style.html
> 
> Comments/Critiques?

The recommendation of variable.name over variable_name or variableName
is contentious (to say the least) because of the clash with S3 method
conventions.

The ESS convention of single, double and triple # comments needs at
least to be mentioned. Otherwise, unsuspecting programmers will be
driven up the wall when coding or editing in Emacs.

> 
> Thanks,
> Esmail
> 
> ps: Reminds me of PEP 8 for Python
> 
>     http://www.python.org/dev/peps/pep-0008/
> 
>     Maybe not that surprising since Python is also one of the main
> languages
>     used by Google.
> 
> ______________________________________________
> 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.


-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907




More information about the R-help mailing list