R programming assigment 2