This is Assignment 2 in R