Initial code of Programming R Assignment 2