Various R code snippets.