completed assignment2 coursera r progromming