Adding my code for R Programming Assignment 2