Coursera "R Programming" assignment week 3