mlb_rosters {baseballr}R Documentation

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)

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'

Value

Returns a tibble with the following columns:

col_name types
jersey_number character
person_id integer
person_full_name character
person_link character
position_code character
position_name character
position_type character
position_abbreviation character
status_code character
status_description character
link character
team_id integer
roster_type character
season numeric
date character

Examples


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


[Package baseballr version 1.6.0 Index]