R programming assignment 2

first attemp for assignment 2