Useful R code

I put together this page to refer back to some useful R codes I’ve used in the past.