Description Usage Arguments Examples
This function allows you to scrape all leaderboard statistics (basic and advanced) from FanGraphs.com.
1 | fg_bat_leaders(x, y, league = "all", qual = "y", ind = 0)
|
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 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. Defaults to "y". |
ind |
Whether or not to break the seasons out individual, or roll them up together. 1 = split seasons, 0 = aggregate seasons. |
1 | ## Not run: fg_bat_leaders(x = 2015, y = 2015, qual = 400)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.