First attempt at R Assignment 2