Skip to contents

MLB Baseball Stats

Usage

mlb_baseball_stats()

Value

Returns a tibble with the following columns:

col_nametypesdescription
stat_namecharacterInternal stat name.
stat_lookup_paramcharacterLookup parameter/abbreviation for the stat.
is_countinglogicalWhether the stat is a counting stat.
stat_labelcharacterHuman-readable stat label.
stat_groupcharacterStat group (e.g. hitting, pitching, fielding).

Examples

# \donttest{
  try(mlb_baseball_stats())
#> ── MLB Baseball Stats data from MLB.com ───────────── baseballr 2.0.0 ──
#>  Data updated: 2026-06-12 14:09:23 UTC
#> # A tibble: 324 × 5
#>    stat_name        stat_lookup_param is_counting stat_label stat_group
#>    <chr>            <chr>             <lgl>       <chr>      <chr>     
#>  1 airOuts          ao                TRUE        Airouts    pitching  
#>  2 assists          a                 TRUE        Assist     fielding  
#>  3 assists          a                 TRUE        Assist     catching  
#>  4 atBats           ab                TRUE        NA         hitting   
#>  5 atBats           ab                TRUE        NA         catching  
#>  6 atBatsPerHomeRun NA                FALSE       NA         hitting   
#>  7 balk             bk                TRUE        Balk       pitching  
#>  8 battingAverage   avg               FALSE       NA         hitting   
#>  9 battingAverage   avg               FALSE       NA         pitching  
#> 10 battingAverage   avg               FALSE       NA         catching  
#> # ℹ 314 more rows
# }