seasons: A numeric vector of 4-digit years associated with given NFL seasons - defaults to latest season. If set to TRUE, returns all available data since 1999.
summary_level: Summarize stats by "season" or "week".
stat_type: Calculate "player" level stats or "team" level stats.
season_type: One of "REG", "POST", or "REG+POST". Filters data to regular season ("REG"), post season ("POST") or keeps all data. Only applied if summary_level == "season".
Returns
A tibble of player/team stats summarized by season/week.
Examples
try({# to avoid CRAN test problemsstats <- calculate_stats(2023,"season","player")dplyr::glimpse(stats)})
See Also
nfl_stats_variables for a description of all variables.