R programming from coursera - coursework number 2