Lahman (version 8.0-0)

Master: Master table

Description

Deprecation Notice: The Master table is now the People table in the Lahman dataset. Master is now a copy of People and is being retained for backward compatibility. Please change your code to use the People table.

Master table - Player names, DOB, and biographical info. This file is to be used to get details about players listed in the Batting, Pitching, and other files where players are identified only by playerID.

Usage

data(Master)

Arguments

Format

A data frame with 19878 observations on the following 26 variables.

% \item{\code{lahmanID}}{Unique number assigned to each player}
playerID

A unique code assigned to each player. The playerID links the data in this file with records on players in the other files.

birthYear

Year player was born

birthMonth

Month player was born

birthDay

Day player was born

birthCountry

Country where player was born

birthState

State where player was born

birthCity

City where player was born

deathYear

Year player died

deathMonth

Month player died

deathDay

Day player died

deathCountry

Country where player died

deathState

State where player died

deathCity

City where player died

nameFirst

Player's first name

nameLast

Player's last name

% \item{\code{nameNote}}{Note about player's name (usually signifying that they changed % their name or played under two differnt names)}
nameGiven

Player's given name (typically first and middle)

% \item{\code{nameNick}}{Player's nickname}
weight

Player's weight in pounds

height

Player's height in inches

bats

a factor: Player's batting hand (left (L), right (R), or both (B))

throws

a factor: Player's throwing hand (left(L) or right(R))

debut

Date that player made first major league appearance

finalGame

Date that player made first major league appearance (blank if still active)

retroID

ID used by retrosheet, http://www.retrosheet.org/

bbrefID

ID used by Baseball Reference website, http://www.baseball-reference.com/

birthDate

Player's birthdate, in as.Date format

deathDate

Player's deathdate, in as.Date format

Details

debut, finalGame were converted from character strings with as.Date.

Examples

Run this code
# NOT RUN {
data(Master); data(Batting)

## add player's name to Batting data
Master$name <- paste(Master$nameFirst, Master$nameLast, sep=" ")
batting <- merge(Batting, 
                 Master[,c("playerID","name")], 
                 by="playerID", all.x=TRUE)

## batting and throwing
# right-handed batters are much less ambidexterous in throwing than left-handed batters
# (should only include batters)

BT <- with(Master, table(bats, throws))
require(vcd)
structable(BT)
mosaic(BT, shade=TRUE)

## Who is Shoeless Joe Jackson?
subset(Master, nameLast=="Jackson" & nameFirst=="Joe")
subset(Master, nameLast=="Jackson" & nameFirst=="Shoeless Joe")

joeID <-c(subset(Master, nameLast=="Jackson" & nameFirst=="Shoeless Joe")["playerID"])

subset(Batting, playerID==joeID)
subset(Fielding, playerID==joeID)


# }

Run the code above in your browser using DataCamp Workspace