fangraphs_leaderboard: Scrape Batter Leaderboards from FanGraphs.com

Description Usage Arguments Value Examples

Description

This function allows you to scrape all leaderboard statistics from FanGraphs.com.

Usage

1
2
fangraphs_leaderboard(bat_pitch = "pit", yearfrom = NULL,
  yearto = NULL, qual = NULL, split = NULL)

Arguments

bat_pitch

either 'bat' or 'pit'

yearfrom

First season for which you want data.

yearto

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

qual

Whether you want only batters 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 minimumm number of plate appearaces, use the number desired.

split

'0' - full season '1' - 7 days '2' - 15 days '3' - 30 days '30' - 1st half '31' - 2nd half '15' - Home '16' - Away '13' - vs LHP or LHB '14' - vs RHP or RHB

Value

data frame

Examples

1
fgh<-fangraphs_leaderboard('pit',2016,2016, 60, 0)

drewgriffith15/griffun documentation built on May 15, 2019, 1:56 p.m.