Added code for R Programming Assignment 2 from file originally forked from Github