load_phf_pbp: *Load fastRhockey PHF play-by-play*

View source: R/phf_pbp.R

load_phf_pbpR Documentation

Load fastRhockey PHF play-by-play

Description

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_phf_pbp(
  seasons = most_recent_phf_season(),
  ...,
  dbConnection = NULL,
  tablename = NULL
)

Arguments

seasons

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

...

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

dbConnection

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

tablename

The name of the play by play data table within the database

Value

A dataframe

Examples


  try(load_phf_pbp(2021))


benhowell71/fastRhockey documentation built on March 1, 2024, 9:23 a.m.