Learn R Programming

nutshell (version 1.02)

batting.2008: 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)

Arguments

source

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

Details

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

Examples

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

Run the code above in your browser using DataLab