R Course Week 3 Programming Assignment 2