Complete implementation of Programming Assignment 2 for R Programming on Coursera