getTeamIDs: Retrieve team IDs for event files

View source: R/getTeamIDs.R

getTeamIDsR Documentation

Retrieve team IDs for event files

Description

This function retrieves the team ID needed for the team argument of getRetrosheet("play", year, team).

Usage

getTeamIDs(year)

Arguments

year

A single valid four-digit numeric year.

Details

All currently available years can be retrieved with type.convert(substr(getFileNames()$event, 1L, 4L))

Value

If the file exists, a named vector of IDs for the given year. Otherwise NA.

Examples


getTeamIDs(2010)



retrosheet documentation built on July 10, 2023, 2:02 a.m.