Learn R Programming

baseballr (version 0.8.6)

code_barrel: Code whether a batted ball is a "barrel" based on a Statcast dataset from baseballsavant.mlb.com

Description

This function allows you to code a batted ball as a barrel as defined by the Statcast research team using data as provided by baseballsavant.mlb.com.

Usage

code_barrel(df)

Arguments

df

A dataframe generated by baseballsavant.mlb.com that must include the following variables: hit_angle and hit_speed.

Examples

Run this code
# NOT RUN {
code_barrel(df)
# }

Run the code above in your browser using DataLab