View source: R/tidy_games_faceoffs.R
tidy_games_faceoffs | R Documentation |
The function tidy_games_faceoffs()
is meant to be a user-friendly way of getting data about
faceoffs in selected NHL games.
tidy_games_faceoffs(
games_id,
time_elapsed = TRUE,
standardized_coordinates = TRUE,
keep_id = FALSE,
return_datatable = getOption("tidynhl.data.table", TRUE)
)
games_id |
Integer vector indicating the NHL ID of selected games for which the faceoff data will be returned. The required format is 'xxxxyyzzzz' where
|
time_elapsed |
(optional) Logical indicating if the time sould be indicated as elapsed
( |
standardized_coordinates |
(optional) Logical indicating if the ice coordinates should be
standardized (away team zone negative on the x-axis) or kept as is. Default to |
keep_id |
(optional) Logical indicating if the IDs of different dimensions should be
returned. However, note that |
return_datatable |
(optional) Logical indicating whether or not a data.table should be
returned. Default can be set globally with |
# Allowing large outputs for the pkgdown website
options(width = 1000L)
# Get faceoffs data of the 2021-01-13 MTL @ TOR game
tidy_games_faceoffs(2020020003L)
# Get faceoffs data of both the 2021-01-13 MTL @ TOR and 2021-01-14 BOS @ NJD games with time
# remaining instead of time elapsed, as is coordinates instead of normalized, and keeping the IDs
tidy_games_faceoffs(
games_id = c(2020020003L, 2020020007L),
time_elapsed = FALSE,
standardized_coordinates = FALSE,
keep_id = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.