Learn R Programming

baseballr (version 0.8.6)

edge_frequency: Edge Percentage Frequency

Description

This function allows you to calculate the percent of pitches thrown to different edges of the strike zone for a pitch by pitch data set that has been coded using the edge_code() function.

Usage

edge_frequency(df, group = NULL)

Arguments

df

A data frame of pitch by pitch data that has been coded using the edge_code() function.

group

Character string indicating what column to group the frequency by. For example, "pitcher" or "batter". Defaults to NULL, which calculates the frequencies across the entire data set.

Examples

Run this code
# NOT RUN {
edge_code(df, group = "pitcher")
# }

Run the code above in your browser using DataLab