https://www.stat.auckland.ac.nz/~ihaka/downloads/R-paper.pdf