R Programming on Coursera - Assignment 2