Description
Use the Cars data set in the SP4R library to complete this exercise.
1. Creating a New Data Set Variable Conditionally
a. Use the new variable that you created in Exercise 1. Create a new variable in the Cars data set called mpg_quality, which is a character variable. Set mpg_quality according to the following table:
Mpg_average Mpg_quality
<20 Low
20-29 Medium
>30 High
b. Print observations 65 through 70 for the variables mpg_average and mpg_quality to ensure that the variable is created.




Reviews
There are no reviews yet.