This is programming assignment 2 for the R Programming Course