Skip to content

Latest commit

 

History

History
63 lines (37 loc) · 1.22 KB

File metadata and controls

63 lines (37 loc) · 1.22 KB
title Coding Standards for R
subtitle
author Roger D. Peng, Associate Professor of Biostatistics
job Johns Hopkins Bloomberg School of Public Health
logo bloomberg_shield.png
framework io2012
highlighter highlight.js
hitheme tomorrow
url
lib assets
../../libraries
../../assets
widgets
mathjax
mode selfcontained

Coding Standards for R

  1. Always use text files / text editor

Coding Standards for R

  1. Always use text files / text editor

  2. Indent your code


Coding Standards for R

  1. Always use text files / text editor

  2. Indent your code

  3. Limit the width of your code (80 columns?)


Indenting

  • Indenting improves readability

  • Fixing line length (80 columns) prevents lots of nesting and very long functions

  • Suggested: Indents of 4 spaces at minimum; 8 spaces ideal


Coding Standards for R

  1. Always use text files / text editor

  2. Indent your code

  3. Limit the width of your code (80 columns?)

  4. Limit the length of individual functions