bat_avg: Batters Average

View source: R/batting_basics.R

bat_avgR Documentation

Batters Average


Calculates a batter's average over a number of innings.


bat_avg(runs_scored, no_dismissals)



A singular value of the runs scored by a batter.


A singular value of the number of times a batters has been dismissed within those innings.


A singular value showing the batter's average.

Additional Information

A batting average is the number of runs divided by the number of times a batters is dismissed. Batters who remain not out at the end of an innings don't have that innings count towards the number of dismissals. The higher average typically indicates a higher quality player. More info here.


bat_avg(runs_scored = 568, no_dismissals = 9)
total_runs <- sum(c(45, 123, 56, 12, 192, 34, 78, 3, 25))
bat_avg(runs_scored = total_runs, no_dismissals = 9)

howzatR documentation built on Sept. 9, 2022, 5:08 p.m.