Description Usage Format Details Source Examples

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

1 |

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

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.

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

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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.