R package primer: a minimal tutorial on writing R packages