R Code to Accompany Solutions to Homework #11