R code snippets that I use often