Snippets of code in R