Learn R Programming

baseballr (version 0.2.0)

fg_bat_leaders: Scrape Batter Leaderboards from FanGraphs.com

Description

This function allows you to scrape all leaderboard statistics (basic and advanced) from FanGraphs.com.

Usage

fg_bat_leaders(x, y, qual)

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.
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.

Examples

Run this code
## Not run: fg_bat_leaders(2015, 2015, 400)

Run the code above in your browser using DataLab