nhl_players_seasons {nhlapi} | R Documentation |
Retrieve selected seasons statistics for players
Description
Retrieve selected seasons statistics for players
Usage
nhl_players_seasons(playerNames, seasons, playerIds = NULL, playoffs = FALSE)
Arguments
playerNames |
character() , vector of one or more player names.
Not case sensitive for convenience.
|
seasons |
numeric() , integer() or character() ,
vector of starting years of desired seasons in YYYY
format, e.g. 1995 or "1995" for season 1995-1996.
Accepts vectors such as c(1995:2000, 2010) to generate
multiple seasons.
Alternatively, also accepts character() with seasons in the
format "YYYYZZZZ" , where ZZZZ = YYYY + 1 , e.g. "19951996" .
This is the format that ultimately gets sent to the NHL API.
Some API endpoints, notably seasons exposed via nhl_seasons()
also allow the value "current" to passed. This value will be
returned unchanged.
|
playerIds |
integer() , vector of one or more ids of the
players. The ids correspond to the ids expected by the NHL
API people endpoint. For most cases the playerNames argument
can be provided for more convenient usage.
|
playoffs |
logical(1) , if FALSE (default) get the regular
seasons data, if TRUE , get the data for the playoffs.
|
Value
data.frame
, with selected season statistics
for selected players.
Examples
## Not run:
nhl_players_seasons(
playerIds = c(8451101, 8458554),
seasons = "19951996",
playoffs = TRUE
)
## End(Not run)
[Package
nhlapi version 0.1.4
Index]