Master {Lahman}R Documentation

Master table

Description

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)

Format

A data frame with 18125 observations on the following 35 variables.

lahmanID

Unique number assigned to each player

playerID

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

managerID

An ID for individuals who served as managers. Links to information in the Managers, ManagersHalf and other files dealing with managers.

hofID

An ID for individuals who are in the baseball Hall of Fame. Links to information in the HallOfFame file.

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

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)

nameNick

Player's nickname

weight

Player's weight in pounds

height

Player's height in inches

bats

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

throws

Player's throwing hand (left or right)

debut

Date that player made first major league appearance

finalGame

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

college

College attended. Further information in Schools and SchoolsPlayers, but not linked in the Master file by schoolID

lahman40ID

ID used in Lahman Database version 4.0

lahman45ID

ID used in Lahman database version 4.5

retroID

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

holtzID

ID used by Sean Holtz's Baseball Almanac

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.

Source

Lahman, S. (2010) Lahman's Baseball Database, 1871-2012, 2012 version, http://baseball1.com/statistics/

Examples


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
BT <- with(Master, table(bats, throws))
library(vcd)
mosaic(BT, shade=TRUE)

plot of chunk unnamed-chunk-1


## Who is Shoeless Joe Jackson?
subset(Master, nameLast=="Jackson" & nameFirst=="Joe")
##      lahmanID  playerID managerID      hofID birthYear birthMonth birthDay
## 6837     6843 jacksjo01      <NA> jacksjo01h      1889          7       16
##      birthCountry birthState      birthCity deathYear deathMonth deathDay
## 6837          USA         SC Pickens County      1951         12        5
##      deathCountry deathState  deathCity nameFirst nameLast nameNote
## 6837          USA         SC Greenville       Joe  Jackson     <NA>
##             nameGiven     nameNick weight height bats throws debut
## 6837 Joseph Jefferson Shoeless Joe    200     73    L      R  <NA>
##      finalGame college lahman40ID lahman45ID  retroID   holtzID   bbrefID
## 6837      <NA>    <NA>  jacksjo01  jacksjo01 jackj101 jacksjo01 jacksjo01
##       deathDate  birthDate        name
## 6837 1951-12-05 1889-07-16 Joe Jackson
joeID <-c(subset(Master, nameLast=="Jackson" & nameFirst=="Joe")["playerID"])

subset(Batting, playerID==joeID)
##        playerID yearID stint teamID lgID   G G_batting  AB   R   H X2B X3B
## 41979 jacksjo01   1908     1    PHA   AL   5         5  23   0   3   0   0
## 41980 jacksjo01   1909     1    PHA   AL   5         5  17   3   3   0   0
## 41981 jacksjo01   1910     1    CLE   AL  20        20  75  15  29   2   5
## 41982 jacksjo01   1911     1    CLE   AL 147       147 571 126 233  45  19
## 41983 jacksjo01   1912     1    CLE   AL 154       154 572 121 226  44  26
## 41984 jacksjo01   1913     1    CLE   AL 148       148 528 109 197  39  17
## 41985 jacksjo01   1914     1    CLE   AL 122       122 453  61 153  22  13
## 41986 jacksjo01   1915     1    CLE   AL  83        83 303  42  99  16   9
## 41987 jacksjo01   1915     2    CHA   AL  45        45 158  21  43   4   5
## 41988 jacksjo01   1916     1    CHA   AL 155       155 592  91 202  40  21
## 41989 jacksjo01   1917     1    CHA   AL 146       146 538  91 162  20  17
## 41990 jacksjo01   1918     1    CHA   AL  17        17  65   9  23   2   2
## 41991 jacksjo01   1919     1    CHA   AL 139       139 516  79 181  31  14
## 41992 jacksjo01   1920     1    CHA   AL 146       146 570 105 218  42  20
##       HR RBI SB CS BB SO IBB HBP SH SF GIDP G_old
## 41979  0   3  0 NA  0 NA  NA   0  0 NA   NA     5
## 41980  0   3  0 NA  1 NA  NA   0  0 NA   NA     5
## 41981  1  11  4 NA  8 NA  NA   0  3 NA   NA    20
## 41982  7  83 41 NA 56 NA  NA   8  6 NA   NA   147
## 41983  3  90 35 NA 54 NA  NA  12 15 NA   NA   154
## 41984  7  71 26 NA 80 26  NA   5 10 NA   NA   148
## 41985  3  53 22 15 41 34  NA   5 13 NA   NA   122
## 41986  3  45 10 10 28 11  NA   3  3 NA   NA    83
## 41987  2  36  6 10 24 12  NA   3  8 NA   NA    45
## 41988  3  78 24 14 46 25  NA   5 16 NA   NA   155
## 41989  5  75 13 NA 57 25  NA   7 19 NA   NA   146
## 41990  1  20  3 NA  8  1  NA   0  5 NA   NA    17
## 41991  7  96  9 NA 60 10  NA   4 17 NA   NA   139
## 41992 12 121  9 12 56 14  NA   7 16 NA   NA   146
subset(Fielding, playerID==joeID)
##        playerID yearID stint teamID lgID POS   G GS InnOuts  PO  A  E DP
## 72399 jacksjo01   1908     1    PHA   AL  OF   5 NA      NA   6  1  1  0
## 72400 jacksjo01   1909     1    PHA   AL  OF   4 NA      NA  10  0  2  0
## 72401 jacksjo01   1910     1    CLE   AL  OF  20 NA      NA  40  2  1  1
## 72402 jacksjo01   1911     1    CLE   AL  OF 147 NA      NA 242 32 12  8
## 72403 jacksjo01   1912     1    CLE   AL  OF 150 NA      NA 273 30 16  2
## 72404 jacksjo01   1913     1    CLE   AL  OF 148 NA      NA 211 28 18  5
## 72405 jacksjo01   1914     1    CLE   AL  OF 119 NA      NA 195 13  7  4
## 72406 jacksjo01   1915     1    CLE   AL  1B  30 NA      NA 284 15  7 12
## 72407 jacksjo01   1915     1    CLE   AL  OF  50 NA      NA  68  6  3  0
## 72408 jacksjo01   1915     2    CHA   AL  OF  45 NA      NA  84  6  5  1
## 72409 jacksjo01   1916     1    CHA   AL  OF 155 NA      NA 290 17  8  5
## 72410 jacksjo01   1917     1    CHA   AL  OF 145 NA      NA 341 18  6  4
## 72411 jacksjo01   1918     1    CHA   AL  OF  17 NA      NA  36  1  0  0
## 72412 jacksjo01   1919     1    CHA   AL  OF 139 NA      NA 252 15  9  4
## 72413 jacksjo01   1920     1    CHA   AL  OF 145 NA      NA 314 14 12  2
##       PB WP SB CS ZR
## 72399 NA NA NA NA NA
## 72400 NA NA NA NA NA
## 72401 NA NA NA NA NA
## 72402 NA NA NA NA NA
## 72403 NA NA NA NA NA
## 72404 NA NA NA NA NA
## 72405 NA NA NA NA NA
## 72406 NA NA NA NA NA
## 72407 NA NA NA NA NA
## 72408 NA NA NA NA NA
## 72409 NA NA NA NA NA
## 72410 NA NA NA NA NA
## 72411 NA NA NA NA NA
## 72412 NA NA NA NA NA
## 72413 NA NA NA NA NA


[Package Lahman version 2.0-1 Index]