| mlb_rosters | R Documentation |
Find MLB Rosters by Roster Type
mlb_rosters(team_id = NULL, season = NULL, date = NULL, roster_type = NULL)
team_id |
team_id to return team roster information for a particular
club. Look up ids with |
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 |
Returns a tibble with one row per roster member with the following
columns (player roster types). The coach roster type instead returns
job, job_id, and title columns in place of the position/status
columns:
| col_name | types | description |
| jersey_number | character | Player's uniform number. |
| person_id | integer | MLBAM player ID. |
| person_full_name | character | Player's full name. |
| person_link | character | API link to the player resource. |
| position_code | character | Numeric scorekeeping position code. |
| position_name | character | Full position name. |
| position_type | character | Position category (e.g. 'Infielder'). |
| position_abbreviation | character | Position abbreviation (e.g. 'SS'). |
| status_code | character | Roster status code (e.g. 'A'). |
| status_description | character | Roster status description (e.g. 'Active'). |
| link | character | API link to the team roster resource. |
| team_id | integer | MLBAM team ID. |
| roster_type | character | Roster type returned. |
| season | numeric | Season requested. |
| date | character | Date requested, or NA if not supplied. |
try(mlb_rosters(team_id = 109, season = 2018, roster_type = 'active'))
try(mlb_rosters(team_id = 109, season = 2018, roster_type = 'coach'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.