Section 11 Example Data

11.1 data(iris)

This famous (Fisher’s or Anderson’s) iris data set gives the measurements in centimeters of the variables sepal length and width and petal length and width, respectively, for 50 flowers from each of 3 species of iris. The species are Iris setosa, versicolor, and virginica.

11.2 data(mtcars)

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.

[, 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

11.3 data(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.

A data frame with 234 rows and 11 variables

manufacturer: name of the 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

11.4 data(warpbreaks)

This data set gives the number of warp breaks per loom, where a loom corresponds to a fixed length of yarn.

A data frame with 54 observations on 3 variables.

[,1] breaks numeric The number of breaks

[,2] wool factor The type of wool (A or B)

[,3] tension factor The level of tension (L, M, H)

There are measurements on 9 looms for each of the six types of warp (AL, AM, AH, BL, BM, BH).

11.5 data(HairEyeColor)

Distribution of hair and eye color and sex in 592 statistics students.

A 3-dimensional array resulting from cross-tabulating 592 observations on 3 variables. The variables and their levels are as follows:

Hair: Black, Brown, Red, Blond

Eye : Brown, Blue, Hazel, Green

Sex : Male, Female