Returns the maximum number of balls in an innings for a given format.
Arguments
- format
Character. Cricket format ("t20", "odi", "test").
Value
Integer. Maximum balls: 120 (T20), 300 (ODI), 540 (Test).
Examples
get_max_balls("t20") # 120
#> [1] 120
get_max_balls("odi") # 300
#> [1] 300
get_max_balls("test") # 540
#> [1] 540