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.
Getting ready
Get R Data Analysis Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.