Description Usage Arguments Details Value Examples
Retrieves MLBAM GameDay files for a specified time interval using
multiple calls of the gameday
function.
1 2 3 4 5 6 |
start |
A valid date in yyyy-mm-dd format (default is |
end |
A valid date in yyyy-mm-dd format (default is |
gameIds |
a vector of specific gameIds that you want to retrieve. If NULL (the default), then the dates are used to fetch the relevant gameIds |
drop.suspended |
Logical indicating whether games with fewer than 5 innings should be excluded. Default is |
yyyy |
A year |
m |
A numeric value corresponding to a month |
Given a beginning and end date, this function will retrieve all data from the MLBAM GameDay server in the specified interval and process them into a single data frame.
A tbl_df
of class GameDayPlays
consisting of play-by-play data
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Get data from one day
ds = getData(start = '2013-03-31')
# Get data from multiple days
## Not run:
ds = getData(start = '2013-03-31', end = '2013-04-02')
## End(Not run)
# Get data for entire 2013 season
## Not run:
ds = getData(start = '2013-03-31', end = '2013-09-30')
## End(Not run)
# Retrieve all of the MLBAM data from May 2013
## Not run:
# ds = getDataMonthly(2013, 5)
## End(Not run)
# Retrieve all the data from the first week of the 2013 season
## Not run:
ds = getDataWeekly('2013-03-31')
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.