statline_from_statcast: Create statlines that include count and rate metrics for...

Description Usage Arguments Examples

Description

This function allows you to create statlines of statistics for players or groups of players from raw Statcast or PITCHf/x data. When calculating wOBA, the most recent year in the data frame is used for weighting.

Usage

1

Arguments

df

A data frame of statistics that includes, at a minimum, the following columns: events, description, game_date, and type.

base

Tells the function what to use as the population of pitches to use for the statline. Either "swings" or "contact". Defaults to swings.

Examples

1
2
3
4
## Not run: 
statline_from_statcast(df, base = "contact")

## End(Not run)

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