dot-calculate_distance: Calculate the Euclidean distance from the attacking net for...

.calculate_distanceR Documentation

Calculate the Euclidean distance from the attacking net for all the events (plays) in a play-by-play

Description

.calculate_distance() calculates the Euclidean distance from the attacking net for all the events (plays) in a play-by-play.

Usage

.calculate_distance(play_by_play)

Arguments

play_by_play

data.frame of play-by-play(s); see gc_play_by_play() and/or wsc_play_by_play() for reference

Value

data.frame with one row per event (play) and added distance column


nhlscraper documentation built on June 29, 2026, 1:06 a.m.