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

load_mls_player_box(
  seasons = most_recent_mls_season(),
  ...,
  dbConnection = NULL,
  tablename = NULL
)

Arguments

seasons

A vector of 4-digit years associated with given MLS seasons. (Min: 2002)

...

Additional arguments passed to an underlying function that writes the season data into a database (used by update_mls_db()).

dbConnection

A DBIConnection object, as returned by DBI::dbConnect()

tablename

The name of the player box data table within the database

Value

Returns a tibble

Examples

# \donttest{
  try(load_mls_player_box(2021))
#> Warning: cannot open URL 'https://raw.githubusercontent.com/saiemgilani/usfootballR-data/master/mls/player_box/rds/player_box_2021.rds': HTTP status was '404 Not Found'
#> Warning: Failed to readRDS from <https://raw.githubusercontent.com/saiemgilani/usfootballR-data/master/mls/player_box/rds/player_box_2021.rds>
#> # A tibble: 0 × 0
# }