Learn R Programming

nhlscrape (version 0.1.3)

AddGameEvents: Adds all game events for game_id to the database for analysis

Description

Add all events from a game_id to the 'events' table. Also adds all players in the game to the 'players' table to allow for searching by name to retrieve player_id. Finally, adds the total time on ice for each player to the 'player_toi' table. This allows for calculation of certain statistics based on time usage. Will not write if game already exists in the database!

Usage

AddGameEvents(game_ids)

Arguments

game_ids

List, list of game_ids. Use GetGameIdRange to find

Examples

Run this code
# NOT RUN {
SetDbPath(example = TRUE)
AddGameEvents(2019020001)

# }

Run the code above in your browser using DataLab