mpg
Fuel economy data from 1999 and 2008 for 38 popular models of car
This dataset contains a subset of the fuel economy data that the EPA makes available on http://fueleconomy.gov. It contains only models which had a new release every year between 1999 and 2008 - this was used as a proxy for the popularity of the car.
- Keywords
- datasets
Usage
mpg
Format
A data frame with 234 rows and 11 variables
- manufacturer
- model
model name
- displ
engine displacement, in litres
- year
year of manufacture
- cyl
number of cylinders
- trans
type of transmission
- drv
f = front-wheel drive, r = rear wheel drive, 4 = 4wd
- cty
city miles per gallon
- hwy
highway miles per gallon
- fl
fuel type
- class
"type" of car
Community examples
head (mpg) set.seed(0) id<-1:500 weight1<-rnorm(500, 200, 50) #mean=200, stdev=50 weight2<-rnorm(500, 189, 76) speed<-rnorm(500,40,7) cost<-rexp(500,6)*100 #parameter=6 group<-round(runif(500,3,4)) #min=3 max=4 region<-round(runif(500,8,10)) lab6<-data.frame(id,weight1,weight2,speed,cost,group,region)
Variables in the dataset: * `manufacturer`: Manufacturer/brand name * `model`: Car model name * `displ`: Engine displacement, in litres * `year`: Year of manufacture * `cyl`: Number of cylinders * `trans`: Type of transmission * `drv`: f = front-wheel drive, r = rear wheel drive, 4 = 4wd * `cty`: City miles per gallon * `hwy`: Highway miles per gallon * `fl`: Fuel type. `e` = ethanol, `d` = diesel, `r` = regular, `p` = premium, `c` = natural gas * `class`: The 'type' of car ```r head(mpg) ```