Closed mrcaseb closed 3 years ago
It is related to the number of unique team names in the data. If I combine 2002 and 2017 there are 34 unique team names because in 2017 there were the Chargers and the Rams in LA.
So this is basically a problem that does only exist if I combine different seasons. Don't know if it is worth it to fix this as that is probably not what the function is supposed to do
[1] "ARI" "ATL" "BAL" "BUF" "CAR" "CHI" "CIN" "CLE" "DAL" "DEN" "DET" "GB" "HOU" "IND" "JAX" "KC" "LA" "LAC" "MIA" "MIN" "NE"
[22] "NO" "NYG" "NYJ" "OAK" "PHI" "PIT" "SD" "SEA" "SF" "STL" "TB" "TEN" "WAS"
I think this is fixed by #6
test_season(c(2002,2017))
#> # A tibble: 64 x 8
#> sim team conf division games seed exit draft_order
#> <int> <chr> <chr> <chr> <int> <dbl> <dbl> <dbl>
#> 1 2002 TB NFC NFC South 16 2 22 32
#> 2 2017 PHI NFC NFC East 16 1 22 32
#> 3 2002 OAK AFC AFC West 16 1 21 31
#> 4 2017 NE AFC AFC East 16 1 21 31
#> 5 2002 PHI NFC NFC East 16 1 20 30
#> 6 2017 MIN NFC NFC North 16 2 20 30
#> 7 2002 TEN AFC AFC South 16 2 20 29
#> 8 2017 JAX AFC AFC South 16 3 20 29
#> 9 2002 PIT AFC AFC North 16 3 19 28
#> 10 2017 PIT AFC AFC North 16 2 19 28
#> # ... with 54 more rows
Created on 2021-02-09 by the reprex package (v1.0.0)
I'll create a function for testing first
Created on 2021-02-09 by the reprex package (v1.0.0)
Now let's do 2002:2015 and see everything is looking fine with the draft_order
same for 2017:2019
But if I combine pre and post 2015 the draft_order is messed up. It's maximum is >32 (in this case 34) and it drops the draft picks 1 and 2. Unfortunately the warnings are in German. They say there is no non-missing argument for
max