Wrote some R code