Skip to contents

This function returns a tidy dataframe of common league settings, including details like "1QB" or "2QB/SF", scoring, best ball, team count, IDP etc. This is potentially useful in summarising the features of multiple leagues.

Usage

ff_league(conn)

# S3 method for espn_conn
ff_league(conn)

# S3 method for flea_conn
ff_league(conn)

# S3 method for mfl_conn
ff_league(conn)

# S3 method for sleeper_conn
ff_league(conn)

Arguments

conn

the connection object created by ff_connect()

Value

A one-row summary of each league's main features.

Methods (by class)

  • espn_conn: ESPN: returns a summary of league features.

  • flea_conn: Flea: returns a summary of league features.

  • mfl_conn: MFL: returns a summary of league features.

  • sleeper_conn: Sleeper: returns a summary of league features.

Examples

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird

  conn <- espn_connect(season = 2020, league_id = 899513)

  ff_league(conn)
}) # end try
#> # A tibble: 1 × 16
#>   league_id league_name season league_type franchise_count qb_type idp  
#>   <chr>     <chr>        <int> <chr>                 <int> <chr>   <lgl>
#> 1 899513    Sucio Boys    2020 keeper                   10 2QB/SF  FALSE
#> # … with 9 more variables: scoring_flags <chr>, best_ball <lgl>,
#> #   salary_cap <lgl>, player_copies <dbl>, years_active <chr>, qb_count <chr>,
#> #   roster_size <int>, league_depth <dbl>, keeper_count <int>
# }

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  conn <- fleaflicker_connect(2020, 206154)
  ff_league(conn)
}) # end try
#> # A tibble: 1 × 15
#>   league_id league_name         season league_type franchise_count qb_type idp  
#>   <chr>     <chr>                <int> <chr>                 <dbl> <chr>   <lgl>
#> 1 206154    Jackpot Dynasty Le…   2020 dynasty                  16 1QB     TRUE 
#> # … with 8 more variables: scoring_flags <chr>, best_ball <lgl>,
#> #   salary_cap <lgl>, player_copies <dbl>, qb_count <chr>, roster_size <int>,
#> #   league_depth <dbl>, keeper_count <int>
# }

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  ssb_conn <- ff_connect(platform = "mfl", league_id = 22627, season = 2021)
  ff_league(ssb_conn)
}) # end try
#> # A tibble: 1 × 17
#>   league_id league_name         season league_type franchise_count qb_type idp  
#>   <chr>     <chr>                <int> <chr>                 <dbl> <chr>   <lgl>
#> 1 22627     Four-Eight Dynasty…   2021 dynasty                  12 2QB/SF  TRUE 
#> # … with 10 more variables: scoring_flags <chr>, best_ball <lgl>,
#> #   salary_cap <lgl>, player_copies <dbl>, years_active <chr>, qb_count <chr>,
#> #   roster_size <dbl>, league_depth <dbl>, draft_type <chr>,
#> #   draft_player_pool <chr>
# }

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  jml_conn <- ff_connect(platform = "sleeper", league_id = "522458773317046272", season = 2020)
  ff_league(jml_conn)
}) # end try
#> # A tibble: 1 × 16
#>   league_id         league_name season league_type franchise_count qb_type idp  
#>   <chr>             <chr>        <int> <chr>                 <dbl> <chr>   <lgl>
#> 1 5224587733170462… The JanMic…   2020 dynasty                  12 1QB     FALSE
#> # … with 9 more variables: scoring_flags <chr>, best_ball <lgl>,
#> #   salary_cap <lgl>, player_copies <dbl>, years_active <chr>, qb_count <chr>,
#> #   roster_size <int>, league_depth <dbl>, prev_league_ids <chr>
# }