Skip to content

Commit 367f034

Browse files
committed
Update style guide
Heads-up @Nowosad and @jannes-m this was initially in response to a reviewer comment about dplyr code readability but mission creap took over and I changed some other things. Seem OK?
1 parent f3f97f7 commit 367f034

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

our-style.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ The code does not have to be self-standing: it can depend on code run previously
99
- `"text"` - double quotes for character values
1010
- `for(i in 1:9) {print(i)}` - use space separation for curly brackets
1111
- When indenting your code, use two spaces (tab in RStudio)
12-
- code files should
13-
- feature a name, a date, a short description (to do) and a table of contents
14-
- be sectioned with the help of `---`, `===`, and `###`
15-
The beginning of a code script could look like this:
12+
- When using pipes, pipe the first object (`x %>% fun() %>% ...` not `fun(x) %>% ...`)
13+
- Scripts should (see example below):
14+
- state their aim and (if appropriate) a date and a table of contents
15+
- be sectioned with the help of `---`, `===`, and `###` e.g. as acheived by pressing `Ctl-Shift-R`
1616

1717
```
1818
# Filename: filename.R (2018-02-06)
19-
#
20-
# TO DO: What should the script achieve
19+
# Aim: What should the script achieve
2120
#
2221
# Author(s): Robin Lovelace, Jakub Nowosad, Jannes Muenchow
2322
#

0 commit comments

Comments
 (0)