Programming Assignment for R programming MOOC Coursera Week 3