assignment 2 R programming