Skip to contents

MLB Event Types

Usage

mlb_event_types()

Value

Returns a tibble with the following columns

col_nametypesdescription
plate_appearancelogicalWhether the event counts as a plate appearance.
hitlogicalWhether the event is a hit.
event_codecharacterEvent type code.
base_running_eventlogicalWhether the event is a base-running event.
event_descriptioncharacterHuman-readable event description.

Examples

# \donttest{
  try(mlb_event_types())
#> ── MLB Event Types data from MLB.com ──────────────── baseballr 2.0.0 ──
#>  Data updated: 2026-06-08 11:08:51 UTC
#> # A tibble: 74 × 5
#>    plate_appearance hit   event_code       base_running_event
#>    <lgl>            <lgl> <chr>            <lgl>             
#>  1 FALSE            FALSE pickoff_1b       TRUE              
#>  2 FALSE            FALSE pickoff_2b       TRUE              
#>  3 FALSE            FALSE pickoff_3b       TRUE              
#>  4 FALSE            FALSE pitcher_step_off FALSE             
#>  5 FALSE            FALSE pickoff_error_1b TRUE              
#>  6 FALSE            FALSE pickoff_error_2b TRUE              
#>  7 FALSE            FALSE pickoff_error_3b TRUE              
#>  8 FALSE            FALSE batter_timeout   FALSE             
#>  9 FALSE            FALSE mound_visit      FALSE             
#> 10 FALSE            FALSE no_pitch         FALSE             
#> # ℹ 64 more rows
#> # ℹ 1 more variable: event_description <chr>
# }