R Language Programming Assignment 2