Learn R Programming

nhlscrape (version 0.1.3)

GetTeamId: Search for team id from team name

Description

Retrieve the team ID using the abbreviation, or full name of the team

Usage

GetTeamId(team_name)

Arguments

team_name

Character, contains either abbreviation or full name

Value

Int, team ID number.

Examples

Run this code
# NOT RUN {
SetDbPath(example = TRUE)
AddAllTeamsDb()
GetTeamId("TOR")
GetTeamId("tor")
GetTeamId("Toronto Maple Leafs")

# }

Run the code above in your browser using DataLab