A smattering of code that I use for R