Assignment 2 for Intro to R