util_prepare_player_ids: Prepare player ids based on player names

Description Usage Arguments Value Examples

View source: R/nhl_utils.R

Description

Prepare player ids based on player names

Usage

1
util_prepare_player_ids(playerNames, map = getOption("nhlapi_player_map"))

Arguments

playerNames

character(), vector of one or more player names. Not case sensitive for convenience.

map

data.frame, with 2 columns:

  • nameMd5: character() of hashed player names

  • id: integer() of player ids used by the NHL API

Value

integer(), named vector of found valid player ids, those not found omitted.

Examples

1
  nhlapi:::util_prepare_player_ids(c("joe sakic", "fake player"))

nhlapi documentation built on Feb. 20, 2021, 9:06 a.m.