R Code to Accompany Solutions to Homework #10