Learn R Programming

baseballr (version 0.8.6)

edge_scrape_split: Scrape and Calculating Edge Percentage for Splits

Description

This function allows you to calculate the percent of pitches thrown to different edges of the strike zone over any custom time frame, and to split the data by batter and pitcher handedness. 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_split(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_split("2015-04-05", "2015-04-05", pitcher)
# }

Run the code above in your browser using DataLab