Coursear R prog assignment 2