Assignment2 Rprogramming complete