Learn R Programming

baseballr (version 1.3.0)

fg_milb_batter_game_logs: Scrape MiLB game logs for batters from FanGraphs

Description

This function allows you to scrape MiLB game logs for individual batters from FanGraphs.

Usage

fg_milb_batter_game_logs(playerid, year)

Value

Returns a tibble of Minor League batter game logs with the following columns:

col_nametypes
player_namecharacter
minor_playeridcharacter
Datecharacter
Teamcharacter
Levelcharacter
Oppcharacter
Gnumeric
ABnumeric
PAnumeric
Hnumeric
1Bnumeric
2Bnumeric
3Bnumeric
HRnumeric
Rnumeric
RBInumeric
BBnumeric
IBBnumeric
SOnumeric
HBPnumeric
SFnumeric
SHnumeric
GDPnumeric
SBnumeric
CSnumeric
AVGnumeric
BB%numeric
K%numeric
BB/Knumeric
OBPnumeric
SLGnumeric
OPSnumeric
ISOnumeric
Spdnumeric
BABIPnumeric
wRCnumeric
wRAAnumeric
wOBAnumeric
wRC+numeric
wBsRnumeric
gamedatecharacter
dhinteger

Arguments

playerid

The batter's minor league ID from FanGraphs.

year

The season for which game logs should be returned.

Examples

Run this code
# \donttest{
  try(fg_milb_batter_game_logs(playerid = "sa3010868", year=2021))
# }

Run the code above in your browser using DataLab