R Course - Assignment 2

Section 2 and 3 of assignment 2