Learn R Programming

ffscrapr (version 1.4.8)

ff_standings: Get Standings

Description

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

Usage

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, ...)

Value

A tidy dataframe of standings data

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.

Methods (by class)

  • ff_standings(espn_conn): ESPN: returns standings and points data.

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

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

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

Examples

Run this code
# \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
# }

# \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
# }

# \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
# }

Run the code above in your browser using DataLab