R Prog Assignment 2