mlb_rosters function

Find MLB Rosters by Roster Type

Find MLB Rosters by Roster Type

mlb_rosters(team_id = NULL, season = NULL, date = NULL, roster_type = NULL)

Arguments

  • team_id: team_id to return team roster information for a particular club.
  • season: Year to return team roster information for a particular club in a specific season.
  • date: Date to return team roster and their coaching staff directorial information for a particular team.
  • roster_type: roster_type to return team directorial information for. See mlb_roster_types() for more options. Valid options include: '40Man', 'fullSeason', 'fullRoster', 'nonRosterInvitees', 'active', 'allTime', 'depthChart', 'gameday', 'coach'

Returns

Returns a tibble with the following columns:

col_nametypes
jersey_numbercharacter
person_idinteger
person_full_namecharacter
person_linkcharacter
position_codecharacter
position_namecharacter
position_typecharacter
position_abbreviationcharacter
status_codecharacter
status_descriptioncharacter
linkcharacter
team_idinteger
roster_typecharacter
seasonnumeric
datecharacter

Examples

try(mlb_rosters(team_id = 109, season = 2018, roster_type = 'active')) try(mlb_rosters(team_id = 109, season = 2018, roster_type = 'coach'))