From 46635c97a8b20bf095d2cbe8db3462afed862bd5 Mon Sep 17 00:00:00 2001 From: samantharachelcook Date: Tue, 21 Jul 2009 16:56:19 +0000 Subject: [PATCH] --- google-r-style.html | 439 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 439 insertions(+) create mode 100755 google-r-style.html diff --git a/google-r-style.html b/google-r-style.html new file mode 100755 index 0000000..3f97e27 --- /dev/null +++ b/google-r-style.html @@ -0,0 +1,439 @@ + + + + + + Google's R Style Guide + + + + + + + +

Google's R Style Guide

+ +

+ R is a high-level programming language used primarily for statistical + computing and graphics. The goal of the R Programming Style Guide + is to make our R code easier to read, share, and verify. The rules + below were designed in collaboration with the entire R user community + at Google. +

+ + + + + +
+
    + + +

  1. Notation and Naming
  2. + + + + + +

  3. Syntax
  4. + + + + + +

  5. Organization
  6. + + + + +

  7. Language
  8. + + + + + +

  9. Exceptions
  10. + + The coding conventions described above should be followed, unless + there is good reason to do otherwise. Exceptions include + legacy code and modifying third-party code. + + +

  11. Parting Words
  12. + + Use common sense and BE CONSISTENT. +

    + If you are editing code, take a few minutes to look at the code around + you and determine its style. If others use spaces around their + if + clauses, you should, too. If their comments have little boxes of stars + around them, make your comments have little boxes of stars around them, + too. +

    + + The point of having style guidelines is to have a common vocabulary of + coding so people can concentrate on what you are saying, + rather than on how you are saying it. We present global style + rules here so people + know the vocabulary. But local style is also important. If code you add + to a file looks drastically different from the existing code around it, + the discontinuity will throw readers out of their rhythm when they go to + read it. Try to avoid this. + + OK, enough writing about writing code; the code itself is much more + interesting. Have fun! + + +

  13. References
  14. + + + http://www.maths.lth.se/help/R/RCC/ - R Coding Conventions +
    + http://ess.r-project.org/ - For + emacs users. This runs R in your emacs and has an emacs mode. + +
+ + + + + +