Skip to contents

Per-player time-on-ice totals for a PWHL game. Fetches all shift stints via pwhl_game_shifts() then aggregates them with the internal hockeytech_player_toi() helper.

Usage

pwhl_player_toi(game_id)

Arguments

game_id

PWHL game id (integer or character).

Value

A fastRhockey_data data frame with one row per player, sorted descending by toi_seconds:

col_nametypesdescription
player_idnumericPlayer unique identifier.
first_namecharacterPlayer first name.
last_namecharacterPlayer last name.
toi_secondsintegerTotal time on ice in seconds.
num_shiftsintegerNumber of individual shift stints.
avg_shift_snumericAverage shift length in seconds.

See also

Other PWHL Functions: pwhl_game_corsi(), pwhl_game_shifts()

Author

Saiem Gilani

Examples

# \donttest{
  try(pwhl_player_toi(game_id = 42))
#> ── PWHL Player TOI from HockeyTech ──────────────────────── fastRhockey 1.0.0 ──
#>  Data updated: 2026-06-12 14:21:12 UTC
#> # A tibble: 39 × 6
#>    player_id first_name last_name toi_seconds num_shifts avg_shift_s
#>        <int> <chr>      <chr>           <int>      <int>       <dbl>
#>  1        85 Elaine     Chuli            3584          4       896  
#>  2         6 Aerin      Frankel          2400          2      1200  
#>  3        83 Erin       Ambrose          1534         29        52.9
#>  4        12 Megan      Keller           1478         26        56.8
#>  5        84 Kati       Tabin            1371         26        52.7
#>  6        15 Alina      Müller           1342         24        55.9
#>  7        78 Susanna    Tapani           1326         23        57.7
#>  8       163 Catherine  Daoust           1292         22        58.7
#>  9        32 Laura      Stacey           1266         27        46.9
#> 10        99 Mariah     Keopple          1254         26        48.2
#> # ℹ 29 more rows
# }