submission for programming assignment 2 - Coursera R Programming