Programming assignment solution

The completed Programming Assignment 2 for the R Programming course on
Coursera.