dot-count_goals_shots: Count the as-of-event goal, shots on goal, Fenwick, and Corsi...

.count_goals_shotsR Documentation

Count the as-of-event goal, shots on goal, Fenwick, and Corsi attempts and differentials for all the events (plays) in a play-by-play by perspective

Description

.count_goals_shots() counts the as-of-event goal, shots on goal, Fenwick, and Corsi attempts and differentials for all the events (plays) in a play-by-play by perspective.

Usage

.count_goals_shots(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 columns: homeGoals, awayGoals, homeShots, awayShots, homeFenwick, awayFenwick, homeCorsi, awayCorsi, goalsFor, goalsAgainst, shotsFor, shotsAgainst, fenwickFor, fenwickAgainst, corsiFor, corsiAgainst, goalDifferential, shotDifferential, fenwickDifferential, and corsiDifferential


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