tidy_goalies_stats: Get a tidy dataset of NHL goalies statistics

View source: R/tidy_goalies_stats.R

tidy_goalies_statsR Documentation

Get a tidy dataset of NHL goalies statistics

Description

The function tidy_goalies_stats() is meant to be a user-friendly way of getting the NHL year-by-year statistics of selected goalies

Usage

tidy_goalies_stats(
  players_id,
  regular = TRUE,
  playoffs = TRUE,
  keep_id = FALSE,
  return_datatable = getOption("tidynhl.data.table", TRUE)
)

Arguments

players_id

Integer vector indicating the NHL ID of goalies for whom the statistics will be returned.

regular

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

playoffs

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

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 statistics of Roberto Luongo
tidy_goalies_stats(8466141L)

# Get the NHL career playoffs statistics of both Roberto Luongo and Corey Crawford, keeping the
# IDs
tidy_goalies_stats(c(8466141L, 8470645L), regular = FALSE, keep_id = TRUE)


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