Learn R Programming

baseballr (version 0.8.6)

get_game_pks_mlb: Find game_pk values for professional baseball games (major and minor leagues) via the MLB api http://statsapi.mlb.com/api/

Description

Find game_pk values for professional baseball games (major and minor leagues) via the MLB api http://statsapi.mlb.com/api/

Usage

get_game_pks_mlb(date, level_ids = c(1))

Arguments

date

The date for which you want to find game_pk values for MLB games

level_ids

A numeric vector with ids for each level where game_pks are desired. See below for a reference of level ids.

Value

Returns a data frame that includes game_pk values and additional information for games scheduled or played requested

Level IDs

The following IDs can be passed to the level_ids argument:

1 = MLB 11 = Triple-A 12 = Doubl-A 13 = Class A Advanced 14 = Class A 15 = Class A Short Season 5442 = Rookie Advanced 16 = Rookie 17 = Winter League

Examples

Run this code
# NOT RUN {
get_game_pks_mlb("2019-04-29")
# }

Run the code above in your browser using DataLab