R Intermediate Practice Question 22