Get League Summary
Source:R/0_generics.R
, R/espn_league.R
, R/flea_league.R
, and 2 more
ff_league.Rd
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 class 'espn_conn'
ff_league(conn)
# S3 method for class 'flea_conn'
ff_league(conn)
# S3 method for class 'mfl_conn'
ff_league(conn)
# S3 method for class 'sleeper_conn'
ff_league(conn)
Arguments
- conn
the connection object created by
ff_connect()
Methods (by class)
ff_league(espn_conn)
: ESPN: returns a summary of league features.ff_league(flea_conn)
: Flea: returns a summary of league features.ff_league(mfl_conn)
: MFL: returns a summary of league features.ff_league(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
#> # ℹ 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
#> # ℹ 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
#> # ℹ 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
#> # ℹ 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>
# }