My solution to the course R Programming on Coursera