Added existing R code to repo