Second assignment for Coursera R course