Assignment 1

Completed R code for assignment 1.