table(mpg$fl)
##
## c d e p r
## 1 5 8 52 168
The most popular fuel type in this data set is “r”.
Regarding the fuel type variable, the value “d” represents
diesel, “p” represents premium (petrol) and “r” represents regular
(petrol). Do you think there is an effect of fuel type on how many miles
a vehicle can run on average per gallon of fuel?
Yes, there is an effect of fuel type on how many miles a vehicle can run
on average per gallon of fuel.
Do you think there is a difference in fuel economy for vehicles
made in 1999 and 2008? (When plotting with “year” variable, use
as.factor(year) to convert it to categorical variables. This will be
explained in future classes.).
No, there is no difference in fuel economy for vehicles made in 1999 and
2008.
What happens if you make a scatter plot of class vs drv? Do you
think this plot is useful or not?
This plot shows how many type of drive train a “type” of car have so
it’s little useful.