Learn R Programming

StatsBombR (version 0.1.0)

get.opposingteam: 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

Run this code
# NOT RUN {
events <- get.opposingteam(events)
# }

Run the code above in your browser using DataLab