Getting ready

If you have not already done so, download the data files for this chapter and ensure that the auto-mpg.csv file is in your R working directory. We want to predict mpg based on cylinders, displacement, horsepower, weight, and acceleration.

Get R Data Analysis Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.