forked from bcaffo/courses
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.Rmd
More file actions
63 lines (37 loc) · 1.22 KB
/
Copy pathindex.Rmd
File metadata and controls
63 lines (37 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
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 # {io2012, html5slides, shower, dzslides, ...}
highlighter : highlight.js # {highlight.js, prettify, highlight}
hitheme : tomorrow #
url:
lib: ../../libraries
assets: ../../assets
widgets : [mathjax] # {mathjax, quiz, bootstrap}
mode : selfcontained # {standalone, draft}
---
## 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