Learn R Programming

StatsBombR (version 0.1.0)

get.minutesplayed: This function returns the players from each match, the number of minutes played and the times of their substitution, if applicable.

Description

For use with the all StatsBomb data. After StatsBomb data is read in from the JSON file, this function will return a dataframe of all of the minutes played for each player in each match.

Usage

get.minutesplayed(events)

Arguments

events

Dataframe of event object gathered from the StatsBomb API, need the ElapsedTime variable from the formatelapsedtime.R function.

Value

df

Returns a data frame with all of the player minutes played information for each match.

Examples

Run this code
# NOT RUN {
events <- StatsBombFreeEvents()
events <- formatelapsedtime(events)
get.minutesplayed(events)
# }

Run the code above in your browser using DataLab