Learn R Programming

baseballr (version 1.5.0)

fg_team_pitcher: Scrape Team Pitcher Leaderboards from FanGraphs

Description

Scrape Team Pitcher Leaderboards from FanGraphs

Usage

fg_team_pitcher(x, y, league = "all", qual = 0, pitcher_type = "pit", ind = 1)

Value

A data frame of pitcher data.

col_nametypes
Seasoncharacter
#character
Teamcharacter
Wnumeric
Lnumeric
ERAnumeric
Gnumeric
GSnumeric
CGnumeric
ShOnumeric
SVnumeric
BSnumeric
IPnumeric
TBFnumeric
Hnumeric
Rnumeric
ERnumeric
HRnumeric
BBnumeric
IBBnumeric
HBPnumeric
WPnumeric
BKnumeric
SOnumeric
GBnumeric
FBnumeric
LDnumeric
IFFBnumeric
Ballsnumeric
Strikesnumeric
Pitchesnumeric
RSnumeric
IFHnumeric
BUnumeric
BUHnumeric
K_9numeric
BB_9numeric
K_BBnumeric
H_9numeric
HR_9numeric
AVGnumeric
WHIPnumeric
BABIPnumeric
LOB_pctnumeric
FIPnumeric
GB_FBnumeric
LD_pctnumeric
GB_pctnumeric
FB_pctnumeric
IFFB_pctnumeric
HR_FBnumeric
IFH_pctnumeric
BUH_pctnumeric
Startingnumeric
Start_IPnumeric
Relievingnumeric
Relief_IPnumeric
RARnumeric
WARnumeric
Dollarsnumeric
tERAnumeric
xFIPnumeric
WPAnumeric
WPA_minusnumeric
WPA_plusnumeric
RE24numeric
REWnumeric
pLInumeric
inLInumeric
gmLInumeric
exLInumeric
Pullsnumeric
WPA_LInumeric
Clutchnumeric
FBall_pctnumeric
FBvnumeric
SL_pctnumeric
SLvnumeric
CT_pctnumeric
CTvnumeric
CB_pctnumeric
CBvnumeric
CH_pctnumeric
CHvnumeric
SF_pctnumeric
SFvnumeric
KN_pctnumeric
KNvnumeric
XX_pctnumeric
PO_pctnumeric
wFBnumeric
wSLnumeric
wCTnumeric
wCBnumeric
wCHnumeric
wSFnumeric
wKNnumeric
wFB_Cnumeric
wSL_Cnumeric
wCT_Cnumeric
wCB_Cnumeric
wCH_Cnumeric
wSF_Cnumeric
wKN_Cnumeric
O-Swing_pctnumeric
Z-Swing_pctnumeric
Swing_pctnumeric
O-Contact_pctnumeric
Z-Contact_pctnumeric
Contact_pctnumeric
Zone_pctnumeric
F-Strike_pctnumeric
SwStr_pctnumeric
HLDnumeric
SDnumeric
MDnumeric
ERA-numeric
FIP-numeric
xFIP-numeric
K_pctnumeric
BB_pctnumeric
SIERAnumeric
RS_9numeric
E-Fnumeric
FA_pct (sc)numeric
FT_pct (sc)numeric
FC_pct (sc)numeric
FS_pct (sc)numeric
FO_pct (sc)numeric
SI_pct (sc)numeric
SL_pct (sc)numeric
CU_pct (sc)numeric
KC_pct (sc)numeric
EP_pct (sc)numeric
CH_pct (sc)numeric
SC_pct (sc)numeric
KN_pct (sc)numeric
UN_pct (sc)numeric
vFA (sc)numeric
vFT (sc)numeric
vFC (sc)numeric
vFS (sc)numeric
vFO (sc)numeric
vSI (sc)numeric
vSL (sc)numeric
vCU (sc)numeric
vKC (sc)numeric
vEP (sc)numeric
vCH (sc)numeric
vSC (sc)numeric
vKN (sc)numeric
FA-X (sc)numeric
FT-X (sc)numeric
FC-X (sc)numeric
FS-X (sc)numeric
FO-X (sc)numeric
SI-X (sc)numeric
SL-X (sc)numeric
CU-X (sc)numeric
KC-X (sc)numeric
EP-X (sc)numeric
CH-X (sc)numeric
SC-X (sc)numeric
KN-X (sc)numeric
FA-Z (sc)numeric
FT-Z (sc)numeric
FC-Z (sc)numeric
FS-Z (sc)numeric
FO-Z (sc)numeric
SI-Z (sc)numeric
SL-Z (sc)numeric
CU-Z (sc)numeric
KC-Z (sc)numeric
EP-Z (sc)numeric
CH-Z (sc)numeric
SC-Z (sc)numeric
KN-Z (sc)numeric
wFA (sc)numeric
wFT (sc)numeric
wFC (sc)numeric
wFS (sc)numeric
wFO (sc)numeric
wSI (sc)numeric
wSL (sc)numeric
wCU (sc)numeric
wKC (sc)numeric
wEP (sc)numeric
wCH (sc)numeric
wSC (sc)numeric
wKN (sc)numeric
wFA_C (sc)numeric
wFT_C (sc)numeric
wFC_C (sc)numeric
wFS_C (sc)numeric
wFO_C (sc)numeric
wSI_C (sc)numeric
wSL_C (sc)numeric
wCU_C (sc)numeric
wKC_C (sc)numeric
wEP_C (sc)numeric
wCH_C (sc)numeric
wSC_C (sc)numeric
wKN_C (sc)numeric
O-Swing_pct (sc)numeric
Z-Swing_pct (sc)numeric
Swing_pct (sc)numeric
O-Contact_pct (sc)numeric
Z-Contact_pct (sc)numeric
Contact_pct (sc)numeric
Zone_pct (sc)numeric
Pacenumeric
RA9-WARnumeric
BIP-Winsnumeric
LOB-Winsnumeric
FDP-Winsnumeric
AgeRngnumeric
K-BB_pctnumeric
Pull_pctnumeric
Cent_pctnumeric
Oppo_pctnumeric
Soft_pctnumeric
Med_pctnumeric
Hard_pctnumeric
kwERAnumeric
TTO_pctnumeric
CH_pct_pinumeric
CS_pct_pinumeric
CU_pct_pinumeric
FA_pct_pinumeric
FC_pct_pinumeric
FS_pct_pinumeric
KN_pct_pinumeric
SB_pct_pinumeric
SI_pct_pinumeric
SL_pct_pinumeric
XX_pct_pinumeric
vCH_pinumeric
vCS_pinumeric
vCU_pinumeric
vFA_pinumeric
vFC_pinumeric
vFS_pinumeric
vKN_pinumeric
vSB_pinumeric
vSI_pinumeric
vSL_pinumeric
vXX_pinumeric
CH-X_pinumeric
CS-X_pinumeric
CU-X_pinumeric
FA-X_pinumeric
FC-X_pinumeric
FS-X_pinumeric
KN-X_pinumeric
SB-X_pinumeric
SI-X_pinumeric
SL-X_pinumeric
XX-X_pinumeric
CH-Z_pinumeric
CS-Z_pinumeric
CU-Z_pinumeric
FA-Z_pinumeric
FC-Z_pinumeric
FS-Z_pinumeric
KN-Z_pinumeric
SB-Z_pinumeric
SI-Z_pinumeric
SL-Z_pinumeric
XX-Z_pinumeric
wCH_pinumeric
wCS_pinumeric
wCU_pinumeric
wFA_pinumeric
wFC_pinumeric
wFS_pinumeric
wKN_pinumeric
wSB_pinumeric
wSI_pinumeric
wSL_pinumeric
wXX_pinumeric
wCH_C_pinumeric
wCS_C_pinumeric
wCU_C_pinumeric
wFA_C_pinumeric
wFC_C_pinumeric
wFS_C_pinumeric
wKN_C_pinumeric
wSB_C_pinumeric
wSI_C_pinumeric
wSL_C_pinumeric
wXX_C_pinumeric
O-Swing_pct_pinumeric
Z-Swing_pct_pinumeric
Swing_pct_pinumeric
O-Contact_pct_pinumeric
Z-Contact_pct_pinumeric
Contact_pct_pinumeric
Zone_pct_pinumeric
Pace_pinumeric
Dolnumeric

Arguments

x

First season for which you want data.

y

Last season for which you want data. If multiple years selected, data returned will be aggregate data for the date range. If y = x, function will return single-season data.

league

Option for limiting results to different leagues or overall results. Options are "al", "nl", or "all".

qual

Whether you want only batters/pitchers that qualified in a given season, or the minimum number of plate appearances for inclusion. If you only want qualified hitters, use qual. If a minimum number of plate appearaces/innings pitched, use the number desired. Defaults to "y".

pitcher_type

Whether you want only starting pitchers, relievers, or all pitchers that meet the criteria specified in the qual argument. Options include "pit", "sta", "rel".

ind

Whether or not to break the seasons out individual, or roll them up together. 1 = split seasons, 0 = aggregate seasons.

Examples

Run this code
# \donttest{
  fg_team_pitcher(x = 2015, y = 2015, qual = 150)
# }

Run the code above in your browser using DataLab