Completed Programming Assignment 2

The R code has been edited and updated for the second programming
assignment.  This will be the version used for peer assessment.