This function returns a tidy dataframe of season-long fantasy team stats, including H2H wins as well as points, potential points, and all-play.

ff_standings(conn, ...)

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

# S3 method for flea_conn
ff_standings(conn, include_allplay = TRUE, include_potentialpoints = TRUE, ...)

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

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

Arguments

conn

a conn object created by ff_connect()

...

arguments passed to other methods (currently none)

include_allplay

TRUE/FALSE - return all-play win pct calculation? defaults to TRUE

include_potentialpoints

TRUE/FALSE - return potential points calculation? defaults to TRUE.

Value

A tidy dataframe of standings data

Methods (by class)

  • espn_conn: ESPN: returns standings and points data.

  • flea_conn: Fleaflicker: returns H2H/points/all-play/best-ball data in a table.

  • mfl_conn: MFL: returns H2H/points/all-play/best-ball data in a table.

  • sleeper_conn: Sleeper: returns all standings and points data and manually calculates allplay results.

Examples

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  espn_conn <- espn_connect(season = 2020, league_id = 899513)
  ff_standings(espn_conn)
}) # end try
#> # A tibble: 10 × 12
#>    franchise_id franchise_name          league_rank h2h_wins h2h_losses h2h_ties
#>           <int> <chr>                         <int>    <int>      <int>    <int>
#>  1            1 "The Early GGod"                  7        3          9        0
#>  2            2 "Coom  Dumpster"                  3        7          5        0
#>  3            3 "PAKI STANS"                      6        4          8        0
#>  4            4 "I'm Also Sad "                   5        7          5        0
#>  5            5 "The Juggernaut"                  1        9          3        0
#>  6            6 "OBJ's Personal Porta …           4        8          4        0
#>  7            7 "Tony El Tigre"                   9        5          7        0
#>  8            8 "Big Coomers"                     8        6          6        0
#>  9            9 "RAFI CUNADO"                     2        7          5        0
#> 10           10 "Austin 🐐Drew Lock🐐"           10        4          8        0
#> # … with 6 more variables: h2h_winpct <dbl>, points_for <dbl>,
#> #   points_against <dbl>, allplay_wins <dbl>, allplay_losses <dbl>,
#> #   allplay_winpct <dbl>
# }

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  conn <- fleaflicker_connect(season = 2020, league_id = 206154)
  x <- ff_standings(conn)
}) # end try
# }

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  ssb_conn <- ff_connect(platform = "mfl", league_id = 54040, season = 2020)
  ff_standings(ssb_conn)
}) # end try
#> # A tibble: 14 × 20
#>    franchise_id franchise_name     h2h_wins h2h_losses h2h_ties h2h_winpct
#>    <chr>        <chr>                 <dbl>      <dbl>    <dbl>      <dbl>
#>  1 0009         Team Link                10          3        0      0.769
#>  2 0010         Team Yoshi                9          4        0      0.692
#>  3 0014         Team Luigi               10          3        0      0.769
#>  4 0003         Team Donkey Kong          6          7        0      0.462
#>  5 0006         Team King Dedede          8          5        0      0.615
#>  6 0011         Team Diddy Kong           8          5        0      0.615
#>  7 0008         Team Bowser               7          6        0      0.538
#>  8 0007         Team Kirby                7          6        0      0.538
#>  9 0002         Team Simon Belmont        6          7        0      0.462
#> 10 0004         Team Ice Climbers         5          8        0      0.385
#> 11 0005         Team Dr. Mario            5          8        0      0.385
#> 12 0013         Team Ness                 3         10        0      0.231
#> 13 0012         Team Mewtwo               4          9        0      0.308
#> 14 0001         Team Pikachu              3         10        0      0.231
#> # … with 14 more variables: allplay_wins <dbl>, allplay_losses <dbl>,
#> #   allplay_ties <dbl>, allplay_winpct <dbl>, points_for <dbl>,
#> #   points_against <dbl>, max_points_against <dbl>, min_points_against <dbl>,
#> #   potential_points <dbl>, victory_points <dbl>, offensive_points <dbl>,
#> #   defensive_points <dbl>, power_rank <dbl>, power_rank_alt <dbl>
# }

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  jml_conn <- ff_connect(platform = "sleeper", league_id = "522458773317046272", season = 2020)
  ff_standings(jml_conn)
}) # end try
#> # A tibble: 12 × 12
#>    franchise_id franchise_name    h2h_wins h2h_losses h2h_ties h2h_winpct
#>           <int> <chr>                <dbl>      <dbl>    <dbl>      <dbl>
#>  1            1 Fake News                8          5        0     0.615 
#>  2            2 KingGabe                 1         12        0     0.0769
#>  3            3 solarpool                8          5        0     0.615 
#>  4            4 The FANTom Menace        8          5        0     0.615 
#>  5            5 Barbarians               6          7        0     0.462 
#>  6            6 sox05syd                 8          5        0     0.615 
#>  7            7 Flipadelphia05          10          3        0     0.769 
#>  8            8 Hocka Flocka             7          6        0     0.538 
#>  9            9 ZPMiller97               4          9        0     0.308 
#> 10           10 JMLarkin                 1         12        0     0.0769
#> 11           11 Permian Panthers         8          5        0     0.615 
#> 12           12 jaydk                    9          4        0     0.692 
#> # … with 6 more variables: points_for <dbl>, points_against <dbl>,
#> #   potential_points <dbl>, allplay_wins <dbl>, allplay_losses <dbl>,
#> #   allplay_winpct <dbl>
# }