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
#>   <chr> <int> <int>            <int>            <int>         <int>
#> 1 QB        1     1                9                0             2
#> 2 RB        2     4                9                0             2
#> 3 WR        3     5                9                0             2
#> 4 TE        1     3                9                0             2
#> 5 DST       1     1                9                0             2
#> 6 K         1     1                9                0             2
#> # ℹ 1 more variable: total_starters <int>
# }

# \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
#>    <chr> <int> <int>            <int>            <int>         <int>
#>  1 CB        2     4                7                8             1
#>  2 EDR       0     4                7                8             1
#>  3 IL        0     4                7                8             1
#>  4 K         1     1                7                8             1
#>  5 LB        2     4                7                8             1
#>  6 QB        1     1                7                8             1
#>  7 RB        2     3                7                8             1
#>  8 S         2     4                7                8             1
#>  9 TE        1     2                7                8             1
#> 10 WR        2     3                7                8             1
#> # ℹ 1 more variable: total_starters <int>
# }

# \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
#>   <chr> <int> <int>            <dbl>            <dbl>         <int>
#> 1 CB        2     4                8               10             0
#> 2 DE        2     4                8               10             0
#> 3 DT        1     3                8               10             0
#> 4 LB        2     4                8               10             0
#> 5 QB        1     1                8               10             0
#> 6 RB        1     6                8               10             0
#> 7 S         1     3                8               10             0
#> 8 TE        0     5                8               10             0
#> 9 WR        1     6                8               10             0
#> # ℹ 1 more variable: total_starters <int>
# }

# \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 TE        1     4                9                0              9
#> 4 WR        2     5                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
#>   <chr> <dbl> <dbl>            <dbl>            <dbl>         <dbl>
#> 1 QB        1     2               10               10             0
#> 2 RB        2     5               10               10             0
#> 3 WR        3     6               10               10             0
#> 4 TE        1     4               10               10             0
#> 5 DT        1     3               10               10             0
#> 6 DE        2     4               10               10             0
#> 7 LB        2     4               10               10             0
#> 8 CB        2     4               10               10             0
#> 9 S         1     3               10               10             0
#> # ℹ 1 more variable: total_starters <dbl>
# }