Learn R Programming

baseballr (version 0.8.6)

edge_scrape: Edge Percentage Scrape

Description

This function allows you to calculate the percent of pitches thrown to different edges of the strike zone over any custom time frame. Data is acquired by scraping the GameDay application from MLBAM using Carson Sievert's pitchRx package. The data can take a while to query, particular for large date ranges.

Usage

edge_scrape(start, end, group)

Arguments

start

First date in your date range. Must be a character string in the format "yyyy-mm-dd".

end

Last date in your date range. Must be a character string in the format "yyyy-mm-dd".

group

Character string indicating whether to group the output by pitchers or batters. Options are "pitcher" or "batter".

Examples

Run this code
# NOT RUN {
edge_scrape("2015-04-05", "2015-04-05", pitcher)
# }

Run the code above in your browser using DataLab