Learn R Programming

baseballr (version 0.8.6)

get_batting_orders: Retrieve batting orders for a given MLB game via the MLB api http://statsapi.mlb.com/api/

Description

Retrieve batting orders for a given MLB game via the MLB api http://statsapi.mlb.com/api/

Usage

get_batting_orders(game_pk, type = "starting")

Arguments

game_pk

The unique game_pk identifier for the game

type

Whether to just return the starting lineup ('starting') or all batters that appeared ('all')

Value

Returns a data frame that includes probable starting pitchers and the home plate umpire for the game_pk provided requested

Examples

Run this code
# NOT RUN {
get_batting_orders(566001)
# }

Run the code above in your browser using DataLab