mlbgameday (version 0.0.1)

search_gids: Search the internal game_id data set.

Description

Search the internal game_id data set.

Usage

search_gids(team = NULL, start = NULL, end = NULL, venue = NULL,
  game_type = NULL, home_only = FALSE, away_only = FALSE, ...)

Arguments

team

A team name, or character vector of team names, without the city, as found in the team_ids data set.

start

A start date passed as a character in ISO 8601 format. "2017-05-01"

end

An end date passed as a character in ISO 8601 format. "2017-09-01"

venue

The stadium at which the game(s) were played, as found in the venue_ids data set.

game_type

The type of game(s), as found in the game_ids data set. Typical options include "r" (regular), "w" (world series), "l" (league playoffs), "d" (division playoffs), and "s" (spring training).

home_only

Logical. Collect only home games. The default is FALSE.

away_only

Logical. Collect only away games. The default is FALSE.

...

additional arguments

Examples

Run this code
# NOT RUN {
# Collect all of the regular season games for the 2016 Cleveland Indians.
game_ids <- search_gids(team = "indians", start = "2016-01-01", end = "2016-12-31", game_type = "r")
head(game_ids)

# }
# NOT RUN {
# Collect all games from the 2016 World Series
game_ids <- search_gids(start = "2016-10-25", end = "2016-11-02", game_type = "w")

# Collect all regular season games played at Wrigley Field since 2008.
game_ids <- search_gids(venue = "Wrigley Field")

# Fuzzy search results work too.
game_ids <- search_gids(venue = "Wrigley")

# }

Run the code above in your browser using DataLab