Learn R Programming

nflreadr (version 1.4.1)

load_pfr_advstats: Load Advanced Stats from PFR

Description

Loads player level season stats provided by Pro Football Reference starting with the 2018 season, primarily to augment existing nflverse data.

Usage

load_pfr_advstats(
  seasons = most_recent_season(),
  stat_type = c("pass", "rush", "rec", "def"),
  summary_level = c("week", "season"),
  file_type = getOption("nflreadr.prefer", default = "rds")
)

Value

A tibble of player statistics provided by Pro Football Reference that supplements data in nflverse

Arguments

seasons

a numeric vector specifying what seasons to return, if TRUE returns all available data

stat_type

one of "pass", "rush", "rec", "def"

summary_level

one of "week" (default) or "season" - some data is only available at the season level

file_type

One of c("rds", "qs", "csv", "parquet"). Can also be set globally with options(nflreadr.prefer)

See Also

Examples

Run this code
.for_cran()
# \donttest{
try({ # prevents cran errors
  load_pfr_advstats()
})
# }

Run the code above in your browser using DataLab