Programming assignment 1 for R Programming course