Solutions to the assignment in the course R programming