Rprogramming assignment 2