getOpposingTeam: This function joins the opposing team in each match to all...

get.opposingteamR Documentation

This function joins the opposing team in each match to all events in the data frame.

Description

For use with StatsBomb Data API credentials. This function takes a data frame of events and returns the opposing team for each event. The events data frame must include at least one event from each team per game.

Usage

get.opposingteam(events)

Arguments

events

Dataframe object gathered from the StatsBomb API.

Value

df

Returns a data frame with the opposing team added as a variable.

Examples

events <- get.opposingteam(events)

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