powered by
These functions allow a user to generate run expectancy tables from Baseball Savant data. Tables are automatically assigned to the Global Environment.
run_expectancy_table(df, level = "plate appearance")
A data frame generated from Baseball Savant that has been formatted using the run_expectancy_code() function.
Whether you want run expectancy calculated at the plate appearance or pitch level. Defaults to plate appearance.
# NOT RUN { run_expectancy_table(df, level = "plate appearances") # }
Run the code above in your browser using DataLab