partnership_runs: Calculate the runs made by all batting partnerships in a...

View source: R/partnership_runs.R

partnership_runsR Documentation

Calculate the runs made by all batting partnerships in a given IPL match for a given team

Description

Calculate the runs made by all batting partnerships in a given IPL match for a given team

Usage

partnership_runs(match_id, batting_side)

Arguments

match_id

The unique match id for the desired IPL match, according to ESPNCricInfo

batting_side

The particular batting team in the given IPL match for whom partenrship runs have to be calculated

Value

partnership_runs returns a stacked bar plot with the batting partnerships on the x-axis, the total runs made by the partnership on the y-axis, and the bars filled in by the number of runs made by each batsman in the partnership

Examples


library(ipl)

# Calculate the number of runs made by Mumbai Indians in their match against
# Delhi Capitals on 2019-03-24, by partnerships
partnership_runs(1175358, "Mumbai Indians")


Swaha294/ipl documentation built on May 10, 2022, 3:23 p.m.