R Programming Cousera Programming Assignment 2