Learn R Programming

nhlscrape (version 0.1.3)

GetPlayerStats: WIP - Get advanced statistics for player_id on team_id in a list of games.

Description

This function will search all games in game_ids and return a list of stats for the player id selected. The current stats returned are: - Shots - Goals - Corsi - Fenwick

Usage

GetPlayerStats(player_id, game_ids, team_id)

Arguments

player_id

Int, player ID number

game_ids

List, game ids to check. Must already be in the database

team_id

Int, the ID of the team the player plays for

Value

List, contains a row of stats for even strength and for all situations

Examples

Run this code
# NOT RUN {
SetDbPath(example = TRUE)
AddGameEvents(2019020001)
GetPlayerStats(8475166, 2019020001, 10)

# }

Run the code above in your browser using DataLab