tidy_players_meta: Get a tidy dataset of NHL players metadata

View source: R/tidy_players_meta.R

tidy_players_metaR Documentation

Get a tidy dataset of NHL players metadata

Description

The function tidy_players_meta() is meant to be a user-friendly way of getting metadata about the selected players.

Usage

tidy_players_meta(
  players_id = NULL,
  keep_id = FALSE,
  return_datatable = getOption("tidynhl.data.table", TRUE)
)

Arguments

players_id

(optional) Integer vector indicating the NHL ID of players for whom the metadata will be returned. Default to NULL which will return every players in the NHL database.

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 metadata of every players in the NHL database
tidy_players_meta()

# Get metadata about both Vincent Lecavalier and Carey Price, keeping the IDs
tidy_players_meta(players_id = c(8467329L, 8471679L), keep_id = TRUE)


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