R - Assignment 2