powered by
Using a table of hashed names and ids, get a player id based on the name.
util_map_player_id(x, map = getOption("nhlapi_player_map"))
character(1) a player's name, not case sensitive for convenience.
character(1)
data.frame, with 2 columns:
data.frame
nameMd5: character() of hashed player names
nameMd5
character()
id: integer() of player ids used by the NHL API
id
integer()
integer(1), id of the player or NA_integer if not found.
integer(1)
NA_integer
# NOT RUN { nhlapi:::util_map_player_id( "Joe Sakic", data.frame( nameMd5 = "9d2a915c8610dbc524c1bc800e010fcc", id = 19L, stringsAsFactors = FALSE ) ) # }
Run the code above in your browser using DataLab