course 'R Programming' programming assignment 3