Description Usage Arguments Value Examples
This function allows you to scrape all leaderboard statistics from FanGraphs.com.
1 2 |
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 |
data frame
1 | fgh<-fangraphs_leaderboard('pit',2016,2016, 60, 0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.