matchesvector: This function returns all matches from the specified season...

View source: R/matchesvector.R

matchesvectorR Documentation

This function returns all matches from the specified season and competition.

Description

For use with the StatsBomb Data API credentials. This function is used to access the JSON file from the StatsBomb API and return the matches in vector form. For reference, the premier league has a competition id = 2 and 2018 is season_id = 1.

Usage

matchesvector(username = "username", password = "password",
                      season_id = "season_id", competition_id = "competition_id")

Arguments

username

Character object of your StatsBomb API username.

password

Character object of your StatsBomb API password.

season_id

Character object of the season_id for the matches you wish to access.

competition_id

Character object of the competition_id for the match you wish to access.

Value

vector

Returns a vector with all matches for the specified season and competition.

Examples

matches <- matchesvector(username = "username", password = "password",
                      season_id = "season_id", competition_id = "competition_id")

statsbomb/StatsBombR documentation built on Dec. 3, 2024, 11:53 p.m.