nhl_teams_stats {nhlapi} | R Documentation |
Get team statistics per seasons
Description
Get team statistics per seasons
Usage
nhl_teams_stats(teamIds = NULL, seasons = NULL)
Arguments
teamIds |
integer() , ids of the teams or NULL (default)
for all teams. As of end of 2019, the valid team ids seem to be
in the 1:54 range.
|
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.
|
Value
data.frame
, with seasons statistics for the selected
team(s), one row per each team and season combination.
Examples
## Not run:
# All teams, current seasons
nhl_teams_stats()
# 2 teams, 3 seasons
nhl_teams_stats(1:2, c("20052006", "20062007", "20072008"))
## End(Not run)
[Package
nhlapi version 0.1.4
Index]