Learn R Programming

nflfastR (version 5.0.0)

calculate_player_stats_kicking: Summarize Kicking Stats

Description

[Deprecated]

This function was deprecated because we have a new, much better and harmonized approach in calculate_stats().

Build columns that aggregate kicking stats at the game level.

Usage

calculate_player_stats_kicking(pbp, weekly = FALSE)

Value

a dataframe of kicking stats

Arguments

pbp

A Data frame of NFL play-by-play data typically loaded with load_pbp() or build_nflfastR_pbp().

weekly

If TRUE, returns week-by-week stats, otherwise, stats for the entire data frame in argument pbp.

See Also

https://nflreadr.nflverse.com/reference/load_player_stats.html for the nflreadr function to download this from repo (stat_type = "kicking")

Examples

Run this code
# \donttest{
try({# to avoid CRAN test problems
    pbp <- nflreadr::load_pbp(2021)
    weekly <- calculate_player_stats_kicking(pbp, weekly = TRUE)
    dplyr::glimpse(weekly)

    overall <- calculate_player_stats_kicking(pbp, weekly = FALSE)
    dplyr::glimpse(overall)
})
# }

Run the code above in your browser using DataLab