prepare_xg_data: Prepare xG data

View source: R/prepare_xg_data.R

prepare_xg_dataR Documentation

Prepare xG data

Description

Helper function to prepare hockeyR pbp data for xG calculations

Usage

prepare_xg_data(x)

Arguments

x

A play-by-play data frame generated by hockeyR before xG is calculated

Value

A tibble; pbp data with xG model mutations along with identifiers for game and strength state

Examples

## Not run: 
pbp <- load_pbp(2022) %>% dplyr::select(-xg)
model_data <- prepare_xg_data(pbp)

## End(Not run)

hockeyR documentation built on Oct. 12, 2022, 5:07 p.m.