Learn R Programming

baseballr (version 1.5.0)

mlb_game_wp: Acquire win probability for Major and Minor League games

Description

Acquire win probability for Major and Minor League games

Usage

mlb_game_wp(game_pk, timecode = NULL)

Value

Returns a tibble that includes time codes from the game_pk requested

col_nametypes
home_team_win_probabilitynumeric
away_team_win_probabilitynumeric
home_team_win_probability_addednumeric
at_bat_indexinteger
leverage_indexnumeric

Arguments

game_pk

The game_pk for the game requested

timecode

The time code for the MLB game (format: MMDDYYYY_HHMMSS)

Examples

Run this code
# \donttest{
  try(mlb_game_wp(game_pk = 531060))
# }

Run the code above in your browser using DataLab