R Programming Assignement 2