http://datavu.blogspot.co.uk/2015/01/how-to-create-and-publish-r-package-on.html
https://support.rstudio.com/hc/en-us/articles/200486508-Building-Testing-and-Distributing-Packages