Syntax highlighting blocks of code

A code block can be started with a triple-backtick (```) on its own line, and is ended with another ``` on its own line:

```
# My block of code
```

Syntax highlighting is often autodetected, so a bash script will look like

#!/bin/bash
# This is a simple bash script
chr=$(seq 1 22)
for chr in $chr; do
  # Put some code in here
done

or R

# Load Libraries & Options
rm(list=ls())
getwd()
library(OpenMx)
library(psych)
source("miFunctions.R")
mxOption(NULL,"Default optimizer","NPSOL")
# if you do not have access to NPSOL-enabled version
# of OpenMx, uncomment the statement below:
#mxOption(NULL,"Default optimizer","SLSQP")

Sometimes it doesn’t autodetect properly, so it needs a hint. That goes on the first ``` line:

``` r
# Load Libraries & Options
rm(list=ls())
getwd()
```