R Programming assignment 1