Just a bunch of R code I've been working on.