Learn R Programming

UsingR (version 2.0-7)

MLBattend: Major league baseball attendance data

Description

Data on home-game attendance in Major League Baseball for the years 1969-2000.

Usage

data(MLBattend)

Arguments

Format

A data frame with 838 observations on the following 10 variables.

franchise

Which team

league

American or National league

division

Which division

year

The year (the year 2000 is recorded as 0)

attendance

Actual attendance

runs.scored

Runs scored by the team during year

runs.allowed

Runs allows by the team during year

wins

Number of wins for season

losses

Number of losses for season

games.behind

A measure of how far from division winner the team was. Higher numbers are worse.

Examples

Run this code
# NOT RUN {
data(MLBattend)
boxplot(attendance ~ franchise, MLBattend)
with(MLBattend, cor(attendance,wins))
# }

Run the code above in your browser using DataLab