team.batting.00to08: MLB Team Batting Statistics, 2000-2008

Description Usage Format Details Source Examples

Description

This data set contains statistics on team batting between 2000 and 2008.

Usage

1

Format

A data frame with 270 observations on the following 13 variables.

teamID

a character vector

yearID

a numeric vector

runs

a numeric vector

singles

a numeric vector

doubles

a numeric vector

triples

a numeric vector

homeruns

a numeric vector

walks

a numeric vector

stolenbases

a numeric vector

caughtstealing

a numeric vector

hitbypitch

a numeric vector

sacrificeflies

a numeric vector

atbats

a numeric vector

Details

This data contains aggregate offensive statistics for each team in Major League Baseball between 2000 and 2008. It is used as an example in the book "R in a Nutshell" from O'Reilly Media.

Source

The data was derived from the Baseball Databank database, downloadable from http://www.baseball-databank.org.

Examples

1
2
3
4
5
6
7
8
data(team.batting.00to08)
attach(team.batting.00to08)
runs.mdl <- lm(
  formula=runs~singles+doubles+triples+homeruns+
    walks+hitbypitch+sacrificeflies+
    stolenbases+caughtstealing,
  data=team.batting.00to08)
summary(runs.mdl)

nutshell documentation built on May 29, 2017, 12:40 p.m.

Search within the nutshell package
Search all R packages, documentation and source code