run_expectancy_table: Generate run expectancy tables from Baseball Savant data

View source: R/sc_run_expectancy.R

run_expectancy_tableR Documentation

Generate run expectancy tables from Baseball Savant data

Description

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

Usage

run_expectancy_table(df, level)

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. "PA" or "Pitch"

Examples

## Not run: run_expectancy_table(df, level = "PA")

pontsuyu/mlbR documentation built on March 23, 2023, 6:38 a.m.