Skip to contents

This function returns a tidy dataframe with positional lineup rules.

Usage

ff_starter_positions(conn, ...)

# S3 method for espn_conn
ff_starter_positions(conn, ...)

# S3 method for flea_conn
ff_starter_positions(conn, ...)

# S3 method for mfl_conn
ff_starter_positions(conn, ...)

# S3 method for sleeper_conn
ff_starter_positions(conn, ...)

# S3 method for template_conn
ff_starter_positions(conn, ...)

Arguments

conn

the list object created by ff_connect()

...

other arguments (currently unused)

Value

A tidy dataframe of positional lineup rules, one row per position with minimum and maximum starters as well as total starter calculations.

Methods (by class)

  • ff_starter_positions(espn_conn): ESPN: returns min/max starters for each main player position

  • ff_starter_positions(flea_conn): Fleaflicker: returns minimum and maximum starters for each player position.

  • ff_starter_positions(mfl_conn): MFL: returns minimum and maximum starters for each player position.

  • ff_starter_positions(sleeper_conn): Sleeper: returns minimum and maximum starters for each player position.

  • ff_starter_positions(template_conn): Template: returns minimum and maximum starters for each player position.

Examples

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  conn <- espn_connect(season = 2020, league_id = 1178049)
  ff_starter_positions(conn)
}) # end try
#> # A tibble: 6 × 7
#>   pos     min   max offense_starters defense_starters kdst_starters total_star…¹
#>   <chr> <int> <int>            <int>            <int>         <int>        <int>
#> 1 QB        1     1                7                0             2            9
#> 2 RB        2     4                7                0             2            9
#> 3 WR        3     5                7                0             2            9
#> 4 TE        1     3                7                0             2            9
#> 5 DST       1     1                7                0             2            9
#> 6 K         1     1                7                0             2            9
#> # … with abbreviated variable name ¹​total_starters
# }

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  conn <- fleaflicker_connect(season = 2020, league_id = 206154)
  ff_starter_positions(conn)
}) # end try
#> # A tibble: 10 × 7
#>    pos     min   max offense_starters defense_starters kdst_starters total_sta…¹
#>    <chr> <int> <int>            <int>            <int>         <int>       <int>
#>  1 CB        2     4                7                8             1          16
#>  2 EDR       0     4                7                8             1          16
#>  3 IL        0     4                7                8             1          16
#>  4 K         1     1                7                8             1          16
#>  5 LB        2     4                7                8             1          16
#>  6 QB        1     1                7                8             1          16
#>  7 RB        2     3                7                8             1          16
#>  8 S         2     4                7                8             1          16
#>  9 TE        1     2                7                8             1          16
#> 10 WR        2     3                7                8             1          16
#> # … with abbreviated variable name ¹​total_starters
# }

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  dlfidp_conn <- mfl_connect(2020, league_id = 33158)
  ff_starter_positions(conn = dlfidp_conn)
}) # end try
#> # A tibble: 9 × 7
#>   pos     min   max offense_starters defense_starters kdst_starters total_star…¹
#>   <chr> <int> <int>            <dbl>            <dbl>         <int>        <int>
#> 1 CB        2     4                8               10             0           18
#> 2 DE        2     4                8               10             0           18
#> 3 DT        1     3                8               10             0           18
#> 4 LB        2     4                8               10             0           18
#> 5 QB        1     1                8               10             0           18
#> 6 RB        1     6                8               10             0           18
#> 7 S         1     3                8               10             0           18
#> 8 TE        0     5                8               10             0           18
#> 9 WR        1     6                8               10             0           18
#> # … with abbreviated variable name ¹​total_starters
# }

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  jml_conn <- sleeper_connect(league_id = "652718526494253056", season = 2021)
  ff_starter_positions(jml_conn)
}) # end try
#> # A tibble: 4 × 6
#>   pos     min   max offense_starters defense_starters total_starters
#>   <chr> <int> <int>            <int>            <int>          <int>
#> 1 QB        1     1                9                0              9
#> 2 RB        2     5                9                0              9
#> 3 WR        2     5                9                0              9
#> 4 TE        1     4                9                0              9
# }

# \donttest{
template_conn <- ff_template(roster_type = "idp")
ff_starter_positions(template_conn)
#> # A tibble: 9 × 7
#>   pos     min   max offense_starters defense_starters kdst_starters total_star…¹
#>   <chr> <dbl> <dbl>            <dbl>            <dbl>         <dbl>        <dbl>
#> 1 QB        1     2               10               10             0           20
#> 2 RB        2     5               10               10             0           20
#> 3 WR        3     6               10               10             0           20
#> 4 TE        1     4               10               10             0           20
#> 5 DT        1     3               10               10             0           20
#> 6 DE        2     4               10               10             0           20
#> 7 LB        2     4               10               10             0           20
#> 8 CB        2     4               10               10             0           20
#> 9 S         1     3               10               10             0           20
#> # … with abbreviated variable name ¹​total_starters
# }