RProgramming assignment 2