This is a programming Assignment 2 for R Programming