missing_raw_pbp function

Compute Missing Raw PBP Data on Local Filesystem

Compute Missing Raw PBP Data on Local Filesystem

Uses nflreadr::load_schedules() to load game IDs of finished games and compares these IDs to all files saved under dir. This function is intended to serve as input for save_raw_pbp().

missing_raw_pbp( dir = getOption("nflfastR.raw_directory", default = NULL), seasons = TRUE, verbose = TRUE )

Arguments

  • dir: Path to local directory (defaults to option "nflfastR.raw_directory"). nflfastR will download the raw game files split by season into one sub directory per season.
  • seasons: a numeric vector of seasons to return, default TRUE returns all available data.
  • verbose: If TRUE, will print number of missing game files as well as oldest and most recent missing ID to console.

Returns

A character vector of missing game IDs. If no files are missing, returns NULL invisibly.

Examples

try( missing <- missing_raw_pbp(tempdir()) )

See Also

save_raw_pbp()

  • Maintainer: Ben Baldwin
  • License: MIT + file LICENSE
  • Last published: 2024-11-26