our_style.md

Code

Code lives in the code directory in files named according to the chapter they are in, e.g. 01-venn.R. The code does not have to be self-standing: it can depend on code run previously in the chapter.

Comments

Comment your code unless obvious because the aim is teaching. Use capital first letter for full-line comment.

# Create object x
x = 1:9

Do not capitalise comment for end-of-line comment

y = x^2 # square of x

Text

Use one line per sentence during development for ease of tracking changes. Leave a single empty line space before and after each code chunk.

package_name class_of_object function_name()

Figures

Names of the figures should contain a chapter number, e.g. 04-world_map.png or 11-population_animation.gif.



dgl5gw/geocompr documentation built on May 18, 2019, 8:11 p.m.