Assignment 2 - R programming