View source: R/tidy_games_events.R
tidy_games_events | R Documentation |
The function tidy_games_events()
is meant to be a user-friendly way of connecting events of
different types in selected NHL games.
tidy_games_events(
games_id,
time_elapsed = 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 events will be returned. The required format is 'xxxxyyzzzz' where
|
time_elapsed |
(optional) Logical indicating if the time sould be indicated as elapsed
( |
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 events of the 2021-01-13 MTL @ TOR game
tidy_games_events(2020020003L)
# Get events of both the 2021-01-13 MTL @ TOR and 2021-01-14 BOS @ NJD games with time remaining
# instead of time elapsed, and keeping the IDs
tidy_games_events(
games_id = c(2020020003L, 2020020007L),
time_elapsed = FALSE,
keep_id = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.