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 franchise_id franchise_name    franchise_score optimal_slot actual_slot
#>    <int>        <int> <chr>                       <dbl> <chr>        <chr>      
#>  1     1            1 Herberts are  T-…            100. QB           BE         
#>  2     1            1 Herberts are  T-…            100. RB           BE         
#>  3     1            1 Herberts are  T-…            100. RB           RB         
#>  4     1            1 Herberts are  T-…            100. WR           BE         
#>  5     1            1 Herberts are  T-…            100. WR           WR         
#>  6     1            1 Herberts are  T-…            100. TE           TE         
#>  7     1            1 Herberts are  T-…            100. RB/WR/TE     WR         
#>  8     1            1 Herberts are  T-…            100. RB/WR/TE     RB/WR/TE   
#>  9     1            1 Herberts are  T-…            100. OP           BE         
#> 10     1            1 Herberts are  T-…            100. DST          DST        
#> # … with 288 more rows, and 5 more variables: player_score <dbl>,
#> #   player_name <chr>, player_pos <chr>, team <chr>, player_id <int>
# }