R Code for Coursera Uploads