tidy_goalies_gamelogs: Get a tidy dataset of NHL goalies game logs

View source: R/tidy_goalies_gamelogs.R

tidy_goalies_gamelogsR Documentation

Get a tidy dataset of NHL goalies game logs

Description

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

Usage

tidy_goalies_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 goalies 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 Roberto Luongo
tidy_goalies_gamelogs(8466141L)

# Get the 2010-11 NHL playoffs game logs of both Roberto Luongo and Corey Crawford, keeping the
# IDs
tidy_goalies_gamelogs(
  players_id = c(8466141L, 8470645L),
  seasons_id = "20102011",
  regular = FALSE,
  keep_id = TRUE
)


jplecavalier/tidynhl documentation built on July 28, 2024, 3:48 a.m.