Fielding: Fielding table

Description Usage Format Source Examples

Description

Fielding table

Usage

1

Format

A data frame with 166991 observations on the following 18 variables.

playerID

Player ID code

yearID

Year

stint

player's stint (order of appearances within a season)

teamID

Team; a factor

lgID

League; a factor with levels AA AL FL NL PL UA

POS

Position

G

Games

GS

Games Started

InnOuts

Time played in the field expressed as outs

PO

Putouts

A

Assists

E

Errors

DP

Double Plays

PB

Passed Balls (by catchers)

WP

Wild Pitches (by catchers)

SB

Opponent Stolen Bases (by catchers)

CS

Opponents Caught Stealing (by catchers)

ZR

Zone Rating

Source

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
data(Fielding)
# Basic fielding data

require(plyr)


# Roberto Clemente's fielding profile
# pitching and catching related data removed
subset(Fielding, playerID == "clemero01")[, 1:13]

# Yadier Molina's fielding profile
# PB, WP, SP and CS apply to catchers
subset(Fielding, playerID == "molinya01")

# Pedro Martinez's fielding profile
# Notice what pitchers get away with in this data frame :)
subset(Fielding, playerID == "martipe02")

# Table of games played by Pete Rose at different positions
with(subset(Fielding, playerID == "rosepe01"), xtabs(G ~ POS))

# Career total G/PO/A/E/DP for Luis Aparicio
luis <- subset(Fielding, playerID == "aparilu01", 
                  select = c("G", "PO", "A", "E", "DP"))
colwise(sum)(luis)


# Top ten 2B/SS in turning DPs
dpkey <- ddply(subset(Fielding, POS %in% c("2B", "SS")), "playerID", summarise, 
                        TDP = sum(DP, na.rm = TRUE))
head(arrange(dpkey, desc(TDP)), 10)

# League average fielding statistics, 1961-present

fldg <- subset(Fielding, yearID >= 1961 & POS != "DH",
                  select = c("yearID", "lgID", "POS", "InnOuts", 
                             "PO", "A", "E"))
lgTotalsF <- ddply(fldg, .(yearID, lgID), numcolwise(sum, na.rm = TRUE))
(lgTotalsF <- mutate(lgTotalsF,
                      fpct = round( (PO + A)/(PO + A + E), 3), 
                      OPE = round(InnOuts/E, 3) ))

Lahman documentation built on May 2, 2019, 5:25 p.m.