Assignment 2 for the Coursera R Programming Class