Skip to contents

This function allows you to calculate team-level consistency in run scoring and run prevention over the course of an entire season.

Usage

team_consistency(year)

Arguments

year

Season consistency should be run for.

Value

Returns a tibble with the following columns

col_nametypes
Teamcharacter
Con_Rnumeric
Con_RAnumeric
Con_R_Ptilenumeric
Con_RA_Ptilenumeric

Examples

# \donttest{
  try(team_consistency(year=2021))
#> # A tibble: 30 × 5
#>    Team  Con_R Con_RA Con_R_Ptile Con_RA_Ptile
#>    <chr> <dbl>  <dbl>       <dbl>        <dbl>
#>  1 ARI    0.38   0.32          55            7
#>  2 ATL    0.37   0.42          35           97
#>  3 BAL    0.38   0.34          55           13
#>  4 BOS    0.38   0.37          55           35
#>  5 CHC    0.37   0.41          35           92
#>  6 CHW    0.39   0.4           75           82
#>  7 CIN    0.39   0.39          75           68
#>  8 CLE    0.38   0.38          55           52
#>  9 COL    0.39   0.31          75            3
#> 10 DET    0.38   0.38          55           52
#> # … with 20 more rows
# }