finished R notebook for quiz