Learn R Programming

baseballr (version 1.6.0)

mlb_teams: MLB Teams

Description

MLB Teams

Usage

mlb_teams(
  season = NULL,
  active_status = NULL,
  all_star_statuses = NULL,
  league_ids = NULL,
  sport_ids = NULL,
  game_type = NULL
)

Value

Returns a tibble with the following columns

col_nametypes
team_idinteger
team_full_namecharacter
linkcharacter
seasoninteger
team_codecharacter
file_codecharacter
team_abbreviationcharacter
team_namecharacter
location_namecharacter
first_year_of_playcharacter
short_namecharacter
franchise_namecharacter
club_namecharacter
all_star_statuscharacter
activelogical
venue_idinteger
venue_namecharacter
venue_linkcharacter
spring_venue_idinteger
spring_venue_linkcharacter
league_idinteger
league_namecharacter
league_linkcharacter
division_idinteger
division_namecharacter
division_linkcharacter
sport_idinteger
sport_linkcharacter
sport_namecharacter
spring_league_idinteger
spring_league_namecharacter
spring_league_linkcharacter
spring_league_abbreviationcharacter

Arguments

season

Year to return to return team information for.

active_status

The active statuses to populate teams for a given season.

all_star_statuses

The all-star statuses to populate teams for a given season.

league_ids

The league_id(s) to return team information for.

sport_ids

The sport_id(s) to return team information for.

game_type

The game_type to return team information for.

Examples

Run this code
# \donttest{
  try(mlb_teams(season = 2021, sport_ids = c(1)))
# }

Run the code above in your browser using DataLab