helper that loads multiple seasons from the data repo either into memory or writes it into a db using some forwarded arguments in the dots
Usage
load_nhl_pbp(
seasons = most_recent_nhl_season(),
...,
dbConnection = NULL,
tablename = NULL
)Arguments
- seasons
A vector of 4-digit years associated with given NHL seasons. (Min: 2011)
- ...
Additional arguments passed to an underlying function that writes the season data into a database (used by
update_nhl_db()).- dbConnection
A
DBIConnectionobject, as returned byDBI::dbConnect()- tablename
The name of the play by play data table within the database
Examples
# \donttest{
try(load_nhl_pbp(2021))
#> Warning: cannot open URL 'https://github.com/sportsdataverse/sportsdataverse-data/releases/download/nhl_pbp_full/play_by_play_2021.rds': HTTP status was '404 Not Found'
#> Warning: Failed to readRDS from <https://github.com/sportsdataverse/sportsdataverse-data/releases/download/nhl_pbp_full/play_by_play_2021.rds>
#> ─────────────────────────────────────────────────────────── fastRhockey 1.0.0 ──
#> # A tibble: 0 × 0
# }
