Skip to contents

Compute Base-Out States on Retrosheet Data

Usage

retrosheet_add_states(data, ...)

retrosheet_add_counts(data, ...)

Arguments

data

A data frame of Retrosheet event data generated by baseballr::retrosheet_data().

...

currently ignored

Value

A tibble with nine additional variables provided information about the beginning and ending base-out state for the play. In particular state is the initial state, and new_state is the resulting state.

Examples

if (FALSE) { # \dontrun{
if (require(baseballr)) {
  retro2016 <- baseballr::retrosheet_data(tempdir(), 2016)
  events <- retro2016[[1]][["events"]]
  events_states <- retrosheet_add_states(events)
}
} # }