Google’s coding standards for R

2 Min Read

For any software application in production and produced by a development team, coding standards are an essential tool for promoting maintainability and quality. Google has recently published their coding standards for R, with a compendium of common-sense tips for keeping an R project in shape. The standards Google R programmers adhere to include:

  • File Names: end in .R 
  • Identifiers: variable.name, FunctionName, kConstantName  
  • Line Length: maximum 80 characters  
  • Indentation: two spaces, no tabs  
  • Curly Braces: first on same line, last on own line  

  • Assignment: use <>, not =  
  • Semicolons: don’t use them  
  • Commenting Guidelines: all comments begin with # followed by a space; inline comments need two spaces before the #

Follow the link below to see the other standards and all of the details. (Thanks to Daniel Levine of TechCrunch for the tip.)

Link to original post

For any software application in production and produced by a development team, coding standards are an essential tool for promoting maintainability and quality. Google has recently published their coding standards for R, with a compendium of common-sense tips for keeping an R project in shape. The standards Google R programmers adhere to include:

  • File Names: end in .R 
  • Identifiers: variable.name, FunctionName, kConstantName  
  • Line Length: maximum 80 characters  
  • Indentation: two spaces, no tabs  
  • Curly Braces: first on same line, last on own line  

  • Assignment: use <-, not =  
  • Semicolons: don’t use them  
  • Commenting Guidelines: all comments begin with # followed by a space; inline comments need two spaces before the #

Follow the link below to see the other standards and all of the details. (Thanks to Daniel Levine of TechCrunch for the tip.)

Link to original post

TAGGED:
Share This Article
Exit mobile version