Skip to contents

This function calculates the optimal starters for a given week, using some lineup heuristics.

Usage

espn_potentialpoints(conn, weeks = 1:17)

Arguments

conn

the list object created by ff_connect()

weeks

a numeric vector for determining which weeks to calculate

Value

a tibble with the best lineup for each team and whether they were started or not

Examples

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  conn <- espn_connect(season = 2021, league_id = 950665)
  espn_potentialpoints(conn, weeks = 1)
}) # end try
#> # A tibble: 298 × 11
#>     week franchi…¹ franc…² franc…³ optim…⁴ actua…⁵ playe…⁶ playe…⁷ playe…⁸ team 
#>    <int>     <int> <chr>     <dbl> <chr>   <chr>     <dbl> <chr>   <chr>   <chr>
#>  1     1         1 Herber…    100. QB      BE         18.3 Carson… QB      IND  
#>  2     1         1 Herber…    100. RB      BE          6.3 Tony P… RB      DAL  
#>  3     1         1 Herber…    100. RB      RB          4.9 Ezekie… RB      DAL  
#>  4     1         1 Herber…    100. WR      BE         16.2 Marvin… WR      JAC  
#>  5     1         1 Herber…    100. WR      WR         12.9 A.J. B… WR      TEN  
#>  6     1         1 Herber…    100. TE      TE          9.8 George… TE      SFO  
#>  7     1         1 Herber…    100. RB/WR/… WR         12.4 DJ Moo… WR      CAR  
#>  8     1         1 Herber…    100. RB/WR/… RB/WR/…     8.4 Kenny … WR      NYG  
#>  9     1         1 Herber…    100. OP      BE         18.3 Zach W… QB      NYJ  
#> 10     1         1 Herber…    100. DST     DST        16   Steele… DST     PIT  
#> # … with 288 more rows, 1 more variable: player_id <int>, and abbreviated
#> #   variable names ¹​franchise_id, ²​franchise_name, ³​franchise_score,
#> #   ⁴​optimal_slot, ⁵​actual_slot, ⁶​player_score, ⁷​player_name, ⁸​player_pos
# }