sc_run_expectancy: Generate run expectancy and related measures and variables...

View source: R/sc_run_expectancy.R

sc_run_expectancyR Documentation

Generate run expectancy and related measures and variables from Baseball Savant data

Description

These functions allow a user to generate run expectancy and related measures and variables from Baseball Savant data. Measures and variables will be added to the data frame and a run expectancy table will be assigned to the Global Environment.

Usage

sc_run_expectancy(df, level)

Arguments

df

A data frame generated from Baseball Savant.

level

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

Examples

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

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