fg_bat_mlb_leaders: Scrape Batter Leaderboards from FanGraphs

View source: R/fg_mlb_leaders.R

fg_bat_mlb_leadersR Documentation

Scrape Batter Leaderboards from FanGraphs

Description

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

Usage

fg_bat_mlb_leaders(year, league = "all", qual = "y", ind = 0)

Arguments

year

Season for which you want data.

league

Option for limiting results to different leagues or overall results. Options are "al", "nl", or "all".

qual

Whether you want only batters/pitchers 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/innings pitched, 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.

Examples

## Not run: fg_bat_mlb_leaders(x = 2015, y = 2015, qual = 400)

pontsuyu/mlbR documentation built on March 23, 2023, 6:38 a.m.