Learn R Programming

baseballr (version 1.5.0)

mlb_game_pace: Retrieve game pace metrics for major and minor league

Description

Retrieve game pace metrics for major and minor league

Usage

mlb_game_pace(
  season,
  league_ids = NULL,
  sport_ids = NULL,
  team_ids = NULL,
  game_type = NULL,
  venue_ids = NULL,
  org_type = NULL,
  start_date = NULL,
  end_date = NULL
)

Value

Returns a tibble with the following columns

col_nametypes
hits_per9innnumeric
runs_per9innnumeric
pitches_per9innnumeric
plate_appearances_per9innnumeric
hits_per_gamenumeric
runs_per_gamenumeric
innings_played_per_gamenumeric
pitches_per_gamenumeric
pitchers_per_gamenumeric
plate_appearances_per_gamenumeric
total_game_timecharacter
total_innings_playedinteger
total_hitsinteger
total_runsinteger
total_plate_appearancesinteger
total_pitchersinteger
total_pitchesinteger
total_gamesinteger
total7inn_gamesinteger
total9inn_gamesinteger
total_extra_inn_gamesinteger
time_per_gamecharacter
time_per_pitchcharacter
time_per_hitcharacter
time_per_runcharacter
time_per_plate_appearancecharacter
time_per9inncharacter
time_per77plate_appearancescharacter
total_extra_inn_timecharacter
time_per7inn_gamecharacter
time_per7inn_game_without_extra_inncharacter
total7inn_games_scheduledinteger
total7inn_games_without_extra_inninteger
total9inn_games_completed_earlyinteger
total9inn_games_without_extra_inninteger
total9inn_games_scheduledinteger
hits_per_runnumeric
pitches_per_pitchernumeric
seasoncharacter
sport_idinteger
sport_codecharacter
sport_linkcharacter
pr_portal_calculated_fields_total7inn_gamesinteger
pr_portal_calculated_fields_total9inn_gamesinteger
pr_portal_calculated_fields_total_extra_inn_gamesinteger
pr_portal_calculated_fields_time_per7inn_gamecharacter
pr_portal_calculated_fields_time_per9inn_gamecharacter
pr_portal_calculated_fields_time_per_extra_inn_gamecharacter

Arguments

season

Year for which to return information (Required).

league_ids

The league_id(s) for which to return information.

sport_ids

The sport_id(s) for which to return information.

team_ids

The team_id(s) for which to return information.

game_type

The game_type for which to return information.

venue_ids

Venue directorial information based venue_id.

org_type

pace of game metrics based on team ('T'), league ('L') or sport('S')

start_date

Date of first game for which you want data. Format must be in MM/DD/YYYY format.

end_date

Date of last game for which you want data. Format must be in MM/DD/YYYY format.

Examples

Run this code
# \donttest{
  try(mlb_game_pace(season = 2021, start_date = "09/14/2021", end_date = "09/16/2021"))
# }

Run the code above in your browser using DataLab