code for coursera R class 2014