Learn R Programming

baseballr (version 0.2.0)

batter_boxscore: Retrieve batter boxscore data for a single game played

Description

This function allows a user to retrieve a boxscore of batter statistics for any game played in the PITCHf/x era (2008-current). The function takes a boxscore.xml url as it's only argument and returns boxscore data for both the home and away batters.

Usage

batter_boxscore(x)

Arguments

x
A boxscore.xml url for a given game from the MLBAM GameDay app data.

Examples

Run this code
batter_boxscore("http://gd2.mlb.com/components/game/mlb/year_2016/month_05/day_21/gid_2016_05_21_milmlb_nynmlb_1/boxscore.xml")

Run the code above in your browser using DataLab