run_expectancy_table: Generate run expectancy tables from Baseball Savant data

Description Usage Arguments Examples

Description

These functions allow a user to generate run expectancy tables from Baseball Savant data. Tables are automatically assigned to the Global Environment.

Usage

1
run_expectancy_table(df, level = "plate appearance")

Arguments

df

A data frame generated from Baseball Savant that has been formatted using the run_expectancy_code() function.

level

Whether you want run expectancy calculated at the plate appearance or pitch level. Defaults to plate appearance.

Examples

1
## Not run: run_expectancy_table(df, level = "plate appearances")

Fackz/baseball documentation built on June 25, 2019, 12:05 a.m.