Programming Assignment 4 for RProgramming