Learn R Programming

hockeyR (version 1.3.0)

get_team_records: Get team records from hockey-reference.com

Description

Get team records from hockey-reference.com

Usage

get_team_records(
  season = as.numeric(format(Sys.Date() + 184, "%Y")),
  league = "NHL",
  include_records = TRUE
)

Value

A tibble containing full team names & win-loss records for teams in all desired seasons

Arguments

season

An integer value denoting the end year of the season(s) to scrape

league

The league stats to scrape, either 'NHL' or 'WHA' or get both with c('NHL','WHA')

include_records

Option to exclude records from the function, used to gather full team names & abbreviations for every season since 1918

Examples

Run this code
if (FALSE) {
get_team_records(2021)
}

Run the code above in your browser using DataLab