R related code that I've used.