Skip to contents

MLB Team Alumni

Usage

mlb_team_alumni(team_id = NULL, stat_group = NULL, season = NULL)

Arguments

team_id

Team ID to return information and ranking for a particular statistic for a particular team.

stat_group

Stat group to return information and ranking for a particular statistic in a particular group.

season

Year to return information and ranking for a particular statistic in a given year.

Value

Returns a tibble with the following columns

col_nametypes
player_idinteger
player_full_namecharacter
linkcharacter
first_namecharacter
last_namecharacter
primary_numbercharacter
birth_datecharacter
current_ageinteger
birth_citycharacter
birth_countrycharacter
heightcharacter
weightinteger
activelogical
use_namecharacter
middle_namecharacter
boxscore_namecharacter
nick_namecharacter
gendercharacter
name_matrilinealcharacter
is_playerlogical
is_verifiedlogical
pronunciationcharacter
mlb_debut_datecharacter
name_first_lastcharacter
name_slugcharacter
first_last_namecharacter
last_first_namecharacter
last_init_namecharacter
init_last_namecharacter
full_fml_namecharacter
full_lfm_namecharacter
strike_zone_topnumeric
strike_zone_bottomnumeric
alumni_last_seasoncharacter
birth_state_provincecharacter
draft_yearinteger
primary_position_codecharacter
primary_position_namecharacter
primary_position_typecharacter
primary_position_abbreviationcharacter
bat_side_codecharacter
bat_side_descriptioncharacter
pitch_hand_codecharacter
pitch_hand_descriptioncharacter

Examples

# \donttest{
  try(mlb_team_alumni(team_id = 137, stat_group = 'hitting', season = 2021))
#> ── MLB Team Alumni data from MLB.com ──────────────── baseballr 1.6.0 ──
#>  Data updated: 2024-04-13 21:56:50 UTC
#> # A tibble: 43 × 46
#>    player_id player_full_name  link  first_name last_name primary_number
#>        <int> <chr>             <chr> <chr>      <chr>     <chr>         
#>  1    501303 Ehire Adrianza    /api… Ehire      Adrianza  13            
#>  2    542881 Tyler Anderson    /api… Tyler      Anderson  31            
#>  3    641312 Shaun Anderson    /api… Shaun      Anderson  NA            
#>  4    624414 Christian Arroyo  /api… Christian  Arroyo    25            
#>  5    623214 Abiatal Avelino   /api… Abiatal    Avelino   NA            
#>  6    642772 Luis Alexander B… /api… Luis       Basabe    75            
#>  7    542963 Rob Brantly       /api… Robert     Brantly   30            
#>  8    518516 Madison Bumgarner /api… Madison    Bumgarner 40            
#>  9    502239 Trevor Cahill     /api… Trevor     Cahill    NA            
#> 10    593525 Orlando Calixte   /api… Orlando    Calixte   16            
#> # ℹ 33 more rows
#> # ℹ 40 more variables: birth_date <chr>, current_age <int>,
#> #   birth_city <chr>, birth_country <chr>, height <chr>, weight <int>,
#> #   active <lgl>, use_name <chr>, use_last_name <chr>,
#> #   middle_name <chr>, boxscore_name <chr>, nick_name <chr>,
#> #   gender <chr>, name_matrilineal <chr>, is_player <lgl>,
#> #   is_verified <lgl>, pronunciation <chr>, mlb_debut_date <chr>, …
# }