Assignment 2

R Programming assignment 2, coded and added comments