batting.2008 {nutshell}R Documentation

MLB Batting Data, 2008 Season

Description

This data frame contains information on all 1384 players who had at least one plate appearance in MLB in 2008.

This data set is used as an example in the book "R in a Nutshell" from O'Reilly Media.

Usage

data(batting.2008)

Format

A data frame with 1384 observations on the following 31 variables.

nameLast
a character vector
nameFirst
a character vector
weight
a numeric vector
height
a numeric vector
bats
a character vector
throws
a character vector
debut
a character vector
birthYear
a numeric vector
playerID
a character vector
yearID
a numeric vector
stint
a numeric vector
teamID
a character vector
lgID
a character vector
G
a numeric vector
G_batting
a numeric vector
AB
a numeric vector
R
a numeric vector
H
a numeric vector
2B
a numeric vector
3B
a numeric vector
HR
a numeric vector
RBI
a numeric vector
SB
a numeric vector
CS
a numeric vector
BB
a numeric vector
SO
a numeric vector
IBB
a numeric vector
HBP
a numeric vector
SH
a numeric vector
SF
a numeric vector
GIDP
a numeric vector
G_old
a numeric vector

Details

This data set is used as an example in the book "R in a Nutshell" from O'Reilly Media.

Source

This data is taken from the Baseball Databank database, available from http://www.baseball-databank.org/

Examples

data(batting.2008)
  tapply(X=batting.2008$HR,INDEX=list(batting.2008$teamID),FUN=sum)

[Package nutshell version 1.0 Index]