Programming Assignment 2 for MOOC R Programming on Coursera