Baseball Savant downloads are limited to 25,000 rows. These functions help you build a larger database easily.
Arguments
- the_date
- The date on which you want to download data 
- dir
- Path to a directory to store downloaded files 
- year
- The year for which you want to download data 
- pattern
- passed to - base::list.files()
- x
- Data frame to write. See - readr::write_rds().
- ...
- arguments passed to - readr::write_rds(). Currently ignored.
Examples
statcast_daily("2023-06-11", dir = tempdir())
#> Retrieving data from 2023-06-11
#> Error: Can't assign 92 names to a 94-column data.table
x <- statcast_read_csv(tempdir())
x <- statcast_read_csv(tempdir())
statcast_write_rds(x, tempdir())
#> Error in dplyr::group_by(x, year = lubridate::year(game_date)): ℹ In argument: `year = lubridate::year(game_date)`.
#> Caused by error:
#> ! object 'game_date' not found