code_barrel: *Helper for determining whether a batted ball is a "barrel"*

View source: R/sch_code_barrel.R

code_barrelR Documentation

Helper for determining whether a batted ball is a "barrel"

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: launch_angle and launch_speed.

Value

Returns a tibble with the additional column, barrel.


baseballr documentation built on April 1, 2023, 12:12 a.m.