assignment 1 for R programming on Coursera