Coursera Data Scientist R Programming Assignment 2