R Dataset / Package datasets / mtcars


On this R-data statistics page, you will find information about the mtcars data set which pertains to Motor Trend Car Road Tests. The mtcars data set is found in the datasets R package. You can load the mtcars data set in R by issuing the following command at the console data("mtcars"). This will load the data into a variable called mtcars. If R says the mtcars data set is not found, you can try installing the package by issuing this command install.packages("datasets") and then attempt to reload the data. If you need to download R, you can go to the R project website. You can download a CSV (comma separated values) version of the mtcars R data set. The size of this file is about 1,716 bytes.

Motor Trend Car Road Tests


The data was extracted from the 1974 Motor Trend US magazine, and comprises fuel consumption and 10 aspects of automobile design and performance for 32 automobiles (1973–74 models).




A data frame with 32 observations on 11 variables.

R project statistics dataset table
[, 1] mpg Miles/(US) gallon
[, 2] cyl Number of cylinders
[, 3] disp Displacement (cu.in.)
[, 4] hp Gross horsepower
[, 5] drat Rear axle ratio
[, 6] wt Weight (1000 lbs)
[, 7] qsec 1/4 mile time
[, 8] vs V/S
[, 9] am Transmission (0 = automatic, 1 = manual)
[,10] gear Number of forward gears
[,11] carb Number of carburetors


Henderson and Velleman (1981), Building multiple regression models interactively. Biometrics, 37, 391–411.


pairs(mtcars, main = "mtcars data")
coplot(mpg ~ disp | as.factor(cyl), data = mtcars,
       panel = panel.smooth, rows = 1)

Dataset imported from https://www.r-project.org.

Title Authored on Content type
OpenIntro Statistics Dataset - dream August 9, 2020 - 12:25 PM Dataset
OpenIntro Statistics Dataset - winery_cars August 9, 2020 - 2:38 PM Dataset
R Dataset / Package HSAUR / toothpaste March 9, 2018 - 1:06 PM Dataset
R Dataset / Package HSAUR / pottery March 9, 2018 - 1:06 PM Dataset
R Dataset / Package HistData / Guerry March 9, 2018 - 1:06 PM Dataset
<iframe src="https://r-data.pmagunia.com/iframe/r-dataset-package-datasets-mtcars.html" frameBorder="0" width="100%" height="307px" />
Attachment Size
dataset-10551.csv 1.68 KB
Dataset License
GNU General Public License v2.0
Documentation License
GNU General Public License v2.0

This documentation is licensed under GPLv3 or later.