Basics

Whitespace

for (i in 1:10){
  do_things()
}
range(x, x + 10)

Naming

Documentation & Comments

Long lines

site_data <- data.frame(
  site_id = c(1, 2, 3, 4),
  type = c('control', 'control', 'experiment', 'experiment')
)