The function tidy_skaters_gamelogs() is meant to be a user-friendly way of getting the NHL game logs of selected skaters.

tidy_skaters_gamelogs(
  players_id,
  seasons_id = NULL,
  regular = TRUE,
  playoffs = TRUE,
  tz = Sys.timezone(),
  keep_id = FALSE,
  return_datatable = getOption("tidynhl.data.table", TRUE)
)

Arguments

players_id

Integer vector indicating the NHL ID of skaters for whom the game logs will be returned.

seasons_id

(optional) Character vector indicating the seasons for which the game logs will be returned. The required format for each character is 'xxxxyyyy'. Default to NULL which will return the full career game logs for each player.

regular

(optional) Logical indicating if the regular season game logs should be returned. Default to TRUE.

playoffs

(optional) Logical indicating if the playoffs game logs should be returned. Default to TRUE.

tz

(optional) Character specifying the timezone that should be used for datetime. Default to the user system timezone.

keep_id

(optional) Logical indicating if the IDs of different dimensions should be returned. Default to FALSE.

return_datatable

(optional) Logical indicating whether or not a data.table should be returned. Default can be set globally with options("tidynhl.data.table").

Examples

# Allowing large outputs for the pkgdown website options(width = 1000L) # Get the NHL career game logs of Vincent Lecavalier tidy_skaters_gamelogs(8467329L)
#> player_name season_years season_type game_datetime venue_name team_status team_abbreviation team_shots team_score opponent_score opponent_shots opponent_abbreviation game_status game_nbot game_shootout skater_games skater_goals skater_assists skater_points skater_plusminus skater_pim skater_toi skater_shifts skater_gwg skater_otg skater_shots skater_blocked skater_hits skater_ev_goals skater_ev_assists skater_ev_points skater_ev_toi skater_pp_goals skater_pp_assists skater_pp_points skater_pp_toi skater_pk_goals skater_pk_assists skater_pk_points skater_pk_toi #> 1: Vincent Lecavalier 1998-99 regular 1998-10-09 23:30:00 National Car Rental Center away TBL 29 1 4 36 FLA final 0 FALSE 1 0 0 0 -2 0 15.383333 18 0 0 2 0 0 0 0 0 10.783333 0 0 0 2.600000 0 0 0 2.00000000 #> 2: Vincent Lecavalier 1998-99 regular 1998-10-10 23:00:00 Greensboro Coliseum away TBL 25 4 4 34 CAR final 1 FALSE 1 0 0 0 0 0 14.783333 18 0 0 2 0 1 0 0 0 12.850000 0 0 0 1.750000 0 0 0 0.18333333 #> 3: Vincent Lecavalier 1998-99 regular 1998-10-14 23:00:00 Ice Palace home TBL 22 0 2 23 NYI final 0 FALSE 1 0 0 0 -1 0 16.583333 19 0 0 1 1 2 0 0 0 14.033333 0 0 0 2.000000 0 0 0 0.55000000 #> 4: Vincent Lecavalier 1998-99 regular 1998-10-16 23:00:00 Ice Palace home TBL 26 2 5 36 PHI final 0 FALSE 1 0 0 0 -1 0 13.450000 15 0 0 3 0 2 0 0 0 9.483333 0 0 0 3.633333 0 0 0 0.33333333 #> 5: Vincent Lecavalier 1998-99 regular 1998-10-18 23:00:00 Ice Palace home TBL 32 1 4 32 WSH final 0 FALSE 1 0 0 0 0 0 8.466667 7 0 0 0 0 0 0 0 0 6.533333 0 0 0 1.866667 0 0 0 0.06666667 #> --- #> 1283: Vincent Lecavalier 2015-16 playoffs 2016-04-15 02:30:00 STAPLES Center home LAK 24 3 4 23 SJS final 0 FALSE 1 0 0 0 0 2 13.150000 21 0 0 1 1 1 0 0 0 11.183333 0 0 0 1.616667 0 0 0 0.35000000 #> 1284: Vincent Lecavalier 2015-16 playoffs 2016-04-17 02:30:00 STAPLES Center home LAK 27 1 2 23 SJS final 0 FALSE 1 1 0 1 0 0 12.366667 20 0 0 1 0 1 0 0 0 9.700000 1 0 1 2.666667 0 0 0 0.00000000 #> 1285: Vincent Lecavalier 2015-16 playoffs 2016-04-19 02:30:00 SAP Center at San Jose away LAK 24 2 1 30 SJS final 1 FALSE 1 0 1 1 1 0 16.050000 25 0 0 2 1 3 0 1 1 14.633333 0 0 0 1.200000 0 0 0 0.21666667 #> 1286: Vincent Lecavalier 2015-16 playoffs 2016-04-21 02:30:00 SAP Center at San Jose away LAK 28 2 3 29 SJS final 0 FALSE 1 0 0 0 0 0 16.466667 20 0 0 0 0 3 0 0 0 14.750000 0 0 0 1.716667 0 0 0 0.00000000 #> 1287: Vincent Lecavalier 2015-16 playoffs 2016-04-23 02:30:00 STAPLES Center home LAK 22 3 6 28 SJS final 0 FALSE 1 0 0 0 -1 0 13.633333 23 0 0 4 0 3 0 0 0 12.166667 0 0 0 0.750000 0 0 0 0.71666667
# Get the 2010-11 NHL playoffs game logs of both Vincent Lecavalier and Martin St. Louis, # keeping the IDs tidy_skaters_gamelogs( players_id = c(8467329L, 8466378L), seasons_id = "20102011", regular = FALSE, keep_id = TRUE )
#> player_id player_name season_id season_years season_type game_id game_datetime venue_name team_status team_id team_abbreviation team_shots team_score opponent_score opponent_shots opponent_abbreviation opponent_id game_status game_nbot game_shootout skater_games skater_goals skater_assists skater_points skater_plusminus skater_pim skater_toi skater_shifts skater_gwg skater_otg skater_shots skater_blocked skater_hits skater_ev_goals skater_ev_assists skater_ev_points skater_ev_toi skater_pp_goals skater_pp_assists skater_pp_points skater_pp_toi skater_pk_goals skater_pk_assists skater_pk_points skater_pk_toi #> 1: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030141 2011-04-13 23:00:00 CONSOL Energy Center away 14 TBL 32 0 3 40 PIT 5 final 0 FALSE 1 0 0 0 -2 0 17.88333 21 0 0 2 1 2 0 0 0 16.20000 0 0 0 1.166667 0 0 0 0.51666667 #> 2: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030142 2011-04-15 23:00:00 CONSOL Energy Center away 14 TBL 21 5 1 36 PIT 5 final 0 FALSE 1 1 1 2 0 2 19.13333 24 0 0 2 0 2 0 0 0 14.83333 1 1 2 4.133333 0 0 0 0.16666667 #> 3: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030143 2011-04-18 23:30:00 St. Pete Times Forum home 14 TBL 27 2 3 30 PIT 5 final 0 FALSE 1 2 0 2 -1 0 24.26667 25 0 0 3 0 0 0 0 0 19.38333 2 0 2 4.883333 0 0 0 0.00000000 #> 4: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030144 2011-04-20 23:00:00 St. Pete Times Forum home 14 TBL 31 2 3 53 PIT 5 final 2 FALSE 1 1 1 2 2 0 34.80000 41 0 0 3 2 0 1 1 2 28.83333 0 0 0 5.916667 0 0 0 0.05000000 #> 5: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030145 2011-04-23 16:00:00 CONSOL Energy Center away 14 TBL 25 8 2 33 PIT 5 final 0 FALSE 1 0 2 2 0 0 19.43333 23 0 0 1 1 0 0 1 1 14.86667 0 1 1 4.566667 0 0 0 0.00000000 #> 6: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030146 2011-04-25 23:00:00 St. Pete Times Forum home 14 TBL 21 4 2 29 PIT 5 final 0 FALSE 1 0 0 0 -2 0 19.83333 25 0 0 1 0 1 0 0 0 15.30000 0 0 0 4.500000 0 0 0 0.03333333 #> 7: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030147 2011-04-28 00:00:00 CONSOL Energy Center away 14 TBL 23 1 0 36 PIT 5 final 0 FALSE 1 0 0 0 0 2 18.58333 23 0 0 3 1 0 0 0 0 15.91667 0 0 0 2.666667 0 0 0 0.00000000 #> 8: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030211 2011-04-29 23:00:00 Verizon Center away 14 TBL 24 4 2 28 WSH 15 final 0 FALSE 1 0 0 0 -1 0 20.83333 23 0 0 1 3 0 0 0 0 15.93333 0 0 0 4.316667 0 0 0 0.58333333 #> 9: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030212 2011-05-01 23:00:00 Verizon Center away 14 TBL 23 3 2 37 WSH 15 final 1 FALSE 1 1 1 2 0 0 23.25000 27 0 0 8 0 0 1 0 1 16.21667 0 1 1 6.716667 0 0 0 0.31666667 #> 10: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030213 2011-05-03 22:30:00 St. Pete Times Forum home 14 TBL 30 4 3 32 WSH 15 final 0 FALSE 1 0 1 1 -1 0 20.98333 26 0 0 2 0 0 0 1 1 16.51667 0 0 0 4.333333 0 0 0 0.13333333 #> 11: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030214 2011-05-04 23:00:00 St. Pete Times Forum home 14 TBL 37 5 3 36 WSH 15 final 0 FALSE 1 1 1 2 0 0 19.66667 29 0 0 4 1 0 1 0 1 12.75000 0 1 1 6.866667 0 0 0 0.05000000 #> 12: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030311 2011-05-15 00:00:00 TD Garden away 14 TBL 34 5 2 33 BOS 6 final 0 FALSE 1 0 1 1 0 0 17.95000 19 0 0 2 1 0 0 0 0 13.88333 0 1 1 4.066667 0 0 0 0.00000000 #> 13: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030312 2011-05-18 00:00:00 TD Garden away 14 TBL 41 5 6 35 BOS 6 final 0 FALSE 1 1 1 2 -1 0 21.75000 23 0 0 3 2 0 1 0 1 16.88333 0 1 1 4.700000 0 0 0 0.16666667 #> 14: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030313 2011-05-20 00:00:00 St. Pete Times Forum home 14 TBL 31 0 2 25 BOS 6 final 0 FALSE 1 0 0 0 0 0 20.80000 22 0 0 2 0 0 0 0 0 16.60000 0 0 0 3.916667 0 0 0 0.28333333 #> 15: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030314 2011-05-21 17:30:00 St. Pete Times Forum home 14 TBL 37 5 3 30 BOS 6 final 0 FALSE 1 1 0 1 0 0 19.75000 25 0 0 4 0 2 1 0 1 16.96667 0 0 0 2.783333 0 0 0 0.00000000 #> 16: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030315 2011-05-24 00:00:00 TD Garden away 14 TBL 34 1 3 20 BOS 6 final 0 FALSE 1 0 0 0 -2 0 21.46667 25 0 0 2 1 0 0 0 0 17.35000 0 0 0 4.116667 0 0 0 0.00000000 #> 17: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030316 2011-05-26 00:00:00 St. Pete Times Forum home 14 TBL 26 5 4 20 BOS 6 final 0 FALSE 1 2 1 3 0 0 18.96667 25 1 0 6 0 0 1 0 1 14.68333 1 1 2 4.283333 0 0 0 0.00000000 #> 18: 8466378 Martin St. Louis 20102011 2010-11 playoffs 2010030317 2011-05-28 00:00:00 TD Garden away 14 TBL 24 0 1 38 BOS 6 final 0 FALSE 1 0 0 0 0 0 22.03333 24 0 0 1 2 1 0 0 0 22.03333 0 0 0 0.000000 0 0 0 0.00000000 #> 19: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030141 2011-04-13 23:00:00 CONSOL Energy Center away 14 TBL 32 0 3 40 PIT 5 final 0 FALSE 1 0 0 0 -2 0 16.83333 22 0 0 4 1 4 0 0 0 14.90000 0 0 0 1.283333 0 0 0 0.65000000 #> 20: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030142 2011-04-15 23:00:00 CONSOL Energy Center away 14 TBL 21 5 1 36 PIT 5 final 0 FALSE 1 1 0 1 0 0 18.40000 24 1 0 1 0 0 0 0 0 14.05000 1 0 1 3.800000 0 0 0 0.55000000 #> 21: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030143 2011-04-18 23:30:00 St. Pete Times Forum home 14 TBL 27 2 3 30 PIT 5 final 0 FALSE 1 0 1 1 0 2 23.65000 26 0 0 5 0 0 0 0 0 18.76667 0 1 1 4.883333 0 0 0 0.00000000 #> 22: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030144 2011-04-20 23:00:00 St. Pete Times Forum home 14 TBL 31 2 3 53 PIT 5 final 2 FALSE 1 0 1 1 0 2 26.46667 34 0 0 4 0 3 0 1 1 20.43333 0 0 0 5.916667 0 0 0 0.11666667 #> 23: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030145 2011-04-23 16:00:00 CONSOL Energy Center away 14 TBL 25 8 2 33 PIT 5 final 0 FALSE 1 1 1 2 2 4 17.46667 25 1 0 2 1 0 1 1 2 13.06667 0 0 0 4.400000 0 0 0 0.00000000 #> 24: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030146 2011-04-25 23:00:00 St. Pete Times Forum home 14 TBL 21 4 2 29 PIT 5 final 0 FALSE 1 0 1 1 1 0 18.18333 25 0 0 1 1 1 0 1 1 13.53333 0 0 0 4.650000 0 0 0 0.00000000 #> 25: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030147 2011-04-28 00:00:00 CONSOL Energy Center away 14 TBL 23 1 0 36 PIT 5 final 0 FALSE 1 0 0 0 0 0 17.71667 22 0 0 1 1 2 0 0 0 14.78333 0 0 0 2.466667 0 0 0 0.46666667 #> 26: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030211 2011-04-29 23:00:00 Verizon Center away 14 TBL 24 4 2 28 WSH 15 final 0 FALSE 1 0 2 2 0 0 21.73333 25 0 0 2 1 2 0 1 1 16.83333 0 1 1 4.316667 0 0 0 0.58333333 #> 27: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030212 2011-05-01 23:00:00 Verizon Center away 14 TBL 23 3 2 37 WSH 15 final 1 FALSE 1 2 0 2 2 0 19.68333 24 1 1 3 0 0 1 0 1 12.80000 1 0 1 6.566667 0 0 0 0.31666667 #> 28: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030213 2011-05-03 22:30:00 St. Pete Times Forum home 14 TBL 30 4 3 32 WSH 15 final 0 FALSE 1 1 0 1 1 0 19.50000 25 0 0 4 0 1 1 0 1 15.03333 0 0 0 4.333333 0 0 0 0.13333333 #> 29: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030214 2011-05-04 23:00:00 St. Pete Times Forum home 14 TBL 37 5 3 36 WSH 15 final 0 FALSE 1 0 1 1 0 0 20.75000 26 0 0 3 0 3 0 0 0 13.88333 0 1 1 6.866667 0 0 0 0.00000000 #> 30: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030311 2011-05-15 00:00:00 TD Garden away 14 TBL 34 5 2 33 BOS 6 final 0 FALSE 1 0 0 0 3 2 18.15000 23 0 0 5 0 0 0 0 0 14.08333 0 0 0 4.066667 0 0 0 0.00000000 #> 31: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030312 2011-05-18 00:00:00 TD Garden away 14 TBL 41 5 6 35 BOS 6 final 0 FALSE 1 1 3 4 1 2 20.10000 26 0 0 5 1 0 0 3 3 16.01667 1 0 1 3.783333 0 0 0 0.30000000 #> 32: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030313 2011-05-20 00:00:00 St. Pete Times Forum home 14 TBL 31 0 2 25 BOS 6 final 0 FALSE 1 0 0 0 -1 0 23.15000 23 0 0 5 0 1 0 0 0 18.78333 0 0 0 4.083333 0 0 0 0.28333333 #> 33: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030314 2011-05-21 17:30:00 St. Pete Times Forum home 14 TBL 37 5 3 30 BOS 6 final 0 FALSE 1 0 1 1 0 0 18.80000 24 0 0 5 0 1 0 1 1 16.13333 0 0 0 2.666667 0 0 0 0.00000000 #> 34: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030315 2011-05-24 00:00:00 TD Garden away 14 TBL 34 1 3 20 BOS 6 final 0 FALSE 1 0 0 0 -1 2 19.50000 25 0 0 4 0 0 0 0 0 14.95000 0 0 0 4.166667 0 0 0 0.38333333 #> 35: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030316 2011-05-26 00:00:00 St. Pete Times Forum home 14 TBL 26 5 4 20 BOS 6 final 0 FALSE 1 0 2 2 0 2 17.65000 20 0 0 0 0 1 0 1 1 13.31667 0 1 1 4.100000 0 0 0 0.23333333 #> 36: 8467329 Vincent Lecavalier 20102011 2010-11 playoffs 2010030317 2011-05-28 00:00:00 TD Garden away 14 TBL 24 0 1 38 BOS 6 final 0 FALSE 1 0 0 0 0 0 19.76667 25 0 0 2 1 1 0 0 0 19.76667 0 0 0 0.000000 0 0 0 0.00000000 #> player_id player_name season_id season_years season_type game_id game_datetime venue_name team_status team_id team_abbreviation team_shots team_score opponent_score opponent_shots opponent_abbreviation opponent_id game_status game_nbot game_shootout skater_games skater_goals skater_assists skater_points skater_plusminus skater_pim skater_toi skater_shifts skater_gwg skater_otg skater_shots skater_blocked skater_hits skater_ev_goals skater_ev_assists skater_ev_points skater_ev_toi skater_pp_goals skater_pp_assists skater_pp_points skater_pp_toi skater_pk_goals skater_pk_assists skater_pk_points skater_pk_toi