Learn R Programming

baseballr (version 1.6.0)

mlb_rosters: Find MLB Rosters by Roster Type

Description

Find MLB Rosters by Roster Type

Usage

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

Value

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

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'

Examples

Run this code
# \donttest{
  try(mlb_rosters(team_id = 109, season = 2018, roster_type = 'active'))
  try(mlb_rosters(team_id = 109, season = 2018, roster_type = 'coach'))
# }

Run the code above in your browser using DataLab